|
|
@@ -20,6 +20,13 @@ void IZ_VideoLoadConfig(IZ_VideoState* state, const char* config_path) { |
|
|
|
state->config.max_fps = ini_getl("Video", "MaxFps", IZ_DEFAULT_VIDEO_STATE.config.max_fps, config_path); |
|
|
|
} |
|
|
|
|
|
|
|
void IZ_VideoOverrideConfig(IZ_VideoState* state, u8 argc, const char* argv[]) { |
|
|
|
const char* cmdline_buffer; |
|
|
|
if ((cmdline_buffer = IZ_ConfigGetCommandlineOption(argc, argv, "-f"))) { |
|
|
|
state->config.max_fps = atoi(cmdline_buffer); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
IZ_ProcedureResult IZ_VideoInitialize(IZ_VideoState* state, const char* config_path, u8 argc, const char* argv[]) { |
|
|
|
SDL_memcpy(state, &IZ_DEFAULT_VIDEO_STATE, sizeof(IZ_VideoState)); |
|
|
|
|
|
|
@@ -27,6 +34,7 @@ IZ_ProcedureResult IZ_VideoInitialize(IZ_VideoState* state, const char* config_p |
|
|
|
if (IZ_VideoSaveConfig(state, config_path)) { |
|
|
|
// fprintf_s(stderr, "Error committing video config.\n"); |
|
|
|
} |
|
|
|
IZ_VideoOverrideConfig(state, argc, argv); |
|
|
|
state->last_update_at = 0u; |
|
|
|
|
|
|
|
SDL_Window* window = SDL_CreateWindow( |
|
|
|