Refactor main function and improve file dialog implementation

- Cleaned up formatting in main function for better readability.
- Simplified platform initialization in LoadConfigFile and GetConfigDirectory functions.
- Introduced wrapper methods for file dialog operations to enhance modularity and maintainability.
- Improved code clarity by adjusting line breaks and spacing in various functions.
This commit is contained in:
scawful
2025-09-26 12:43:42 -04:00
parent 41a5b952e4
commit a28ca03cba
5 changed files with 30 additions and 24 deletions

View File

@@ -22,8 +22,10 @@ int main(int argc, char **argv) {
absl::FailureSignalHandlerOptions options;
options.symbolize_stacktrace = true;
options.use_alternate_stack = false; // Disable alternate stack to avoid shutdown conflicts
options.alarm_on_failure_secs = false; // Disable alarm to avoid false positives during SDL cleanup
options.use_alternate_stack =
false; // Disable alternate stack to avoid shutdown conflicts
options.alarm_on_failure_secs =
false; // Disable alarm to avoid false positives during SDL cleanup
options.call_previous_handler = true;
absl::InstallFailureSignalHandler(options);
@@ -183,9 +185,9 @@ int main(int argc, char **argv) {
SDL_PauseAudioDevice(audio_device_, 1);
SDL_CloseAudioDevice(audio_device_);
delete[] audio_buffer_;
//ImGui_ImplSDLRenderer2_Shutdown();
//ImGui_ImplSDL2_Shutdown();
//ImGui::DestroyContext();
// ImGui_ImplSDLRenderer2_Shutdown();
// ImGui_ImplSDL2_Shutdown();
// ImGui::DestroyContext();
SDL_Quit();
return EXIT_SUCCESS;