Fix EmulatorConfig initialization order
`config` was being consumed much too early before it has a chance to call `load`. This caused GPU to read weird uninitialized data, and then `load` called, and then further initialization to occur based on default data and the data inside of `config.toml`. `EmulatorConfig` needs to be loaded in first before any sort of initialization happens, by adding a new constructor so that it can be initialized sooner.
This commit is contained in:
@@ -8,6 +8,7 @@ struct EmulatorConfig {
|
||||
bool shaderJitEnabled = false;
|
||||
RendererType rendererType = RendererType::OpenGL;
|
||||
|
||||
EmulatorConfig(const std::filesystem::path& path);
|
||||
void load(const std::filesystem::path& path);
|
||||
void save(const std::filesystem::path& path);
|
||||
};
|
||||
Reference in New Issue
Block a user