Refactor window creation and enhance file dialog functionality
- Removed unnecessary ImGui frame initialization calls in CreateWindow function to streamline window setup. - Updated FileDialogWrapper to restrict file types in the open file dialog, allowing only specific extensions (sfc, smc, yaze) for improved user experience.
This commit is contained in:
@@ -71,6 +71,7 @@ std::string yaze::core::FileDialogWrapper::ShowOpenFileDialog() {
|
||||
[openPanel setCanChooseFiles:YES];
|
||||
[openPanel setCanChooseDirectories:NO];
|
||||
[openPanel setAllowsMultipleSelection:NO];
|
||||
[openPanel setAllowedFileTypes:@[ @"sfc", @"smc", @"yaze" ]];
|
||||
|
||||
if ([openPanel runModal] == NSModalResponseOK) {
|
||||
NSURL* url = [[openPanel URLs] objectAtIndex:0];
|
||||
|
||||
@@ -49,9 +49,6 @@ absl::Status CreateWindow(Window& window, int flags) {
|
||||
|
||||
gui::ColorsYaze();
|
||||
|
||||
ImGui_ImplSDLRenderer2_NewFrame();
|
||||
ImGui_ImplSDL2_NewFrame();
|
||||
|
||||
const int audio_frequency = 48000;
|
||||
SDL_AudioSpec want, have;
|
||||
SDL_memset(&want, 0, sizeof(want));
|
||||
|
||||
Reference in New Issue
Block a user