Skip to content

Commit

Permalink
Do not save settings while window is maxmized in macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Oct 3, 2024
1 parent 116297d commit 07e088f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ void cfg_save()
if (!g_config.save_settings)
return;

/* Do not save settings while window is maxmized */
if (IsMacOS() && !g_config.window_rect.left && !g_config.window_rect.top)
return;

char buf[16];
char* section = g_config.save_settings == 1 ? "ddraw" : g_config.process_file_name;

Expand Down
2 changes: 0 additions & 2 deletions src/wndproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,6 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam

WaitForSingleObject(g_ddraw.render.thread, INFINITE);
g_ddraw.render.thread = NULL;

g_config.save_settings = 0;
}

if (in_size_move && !g_ddraw.render.thread)
Expand Down

0 comments on commit 07e088f

Please sign in to comment.