Path SDL3 GPU amb PostFX passthrough; Screen amb init/shutdown explicit (v0.4.0)
This commit is contained in:
1 parent
0348acb0eb
commit
6c8ef9ff44
18 files changed
+14213
-38
No files matched your search
+14
-1
@@ -64,6 +64,13 @@ namespace {
|
||||
if (node.contains("fullscreen")) { Options::window.fullscreen = node["fullscreen"].get_value<bool>(); }
|
||||
}
|
||||
|
||||
void parseGpu(const fkyaml::node& video_node) {
|
||||
if (!video_node.contains("gpu")) { return; }
|
||||
const auto& node = video_node["gpu"];
|
||||
if (node.contains("acceleration")) { Options::video.gpu.acceleration = node["acceleration"].get_value<bool>(); }
|
||||
if (node.contains("preferred_driver")) { Options::video.gpu.preferred_driver = node["preferred_driver"].get_value<std::string>(); }
|
||||
}
|
||||
|
||||
void parseVideo(const fkyaml::node& yaml) {
|
||||
if (!yaml.contains("video")) { return; }
|
||||
const auto& node = yaml["video"];
|
||||
@@ -74,6 +81,7 @@ namespace {
|
||||
if (node.contains("texture_filter")) {
|
||||
Options::video.texture_filter = filterFromString(node["texture_filter"].get_value<std::string>());
|
||||
}
|
||||
parseGpu(node);
|
||||
}
|
||||
|
||||
void parseMusic(const fkyaml::node& audio_node) {
|
||||
@@ -155,7 +163,10 @@ namespace Options {
|
||||
out << "video:\n";
|
||||
out << " vsync: " << (video.vsync ? "true" : "false") << "\n";
|
||||
out << " scaling_mode: \"" << scalingModeToString(video.scaling_mode) << "\"\n";
|
||||
out << " texture_filter: \"" << filterToString(video.texture_filter) << "\"\n\n";
|
||||
out << " texture_filter: \"" << filterToString(video.texture_filter) << "\"\n";
|
||||
out << " gpu:\n";
|
||||
out << " acceleration: " << (video.gpu.acceleration ? "true" : "false") << "\n";
|
||||
out << " preferred_driver: \"" << video.gpu.preferred_driver << "\"\n\n";
|
||||
|
||||
out << "audio:\n";
|
||||
out << " enabled: " << (audio.enabled ? "true" : "false") << "\n";
|
||||
@@ -177,6 +188,8 @@ namespace Options {
|
||||
config.vsync = video.vsync;
|
||||
config.scaling_mode = video.scaling_mode;
|
||||
config.texture_filter = video.texture_filter;
|
||||
config.gpu_acceleration = video.gpu.acceleration;
|
||||
config.preferred_driver = video.gpu.preferred_driver;
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user