Merge branch 'master' into jgrpp
# Conflicts: # src/company_cmd.cpp # src/lang/greek.txt # src/table/settings.ini
This commit is contained in:
@@ -196,6 +196,10 @@ bool VideoDriver_Cocoa::ToggleFullscreen(bool full_screen)
|
||||
|
||||
if ([ this->window respondsToSelector:@selector(toggleFullScreen:) ]) {
|
||||
[ this->window performSelector:@selector(toggleFullScreen:) withObject:this->window ];
|
||||
|
||||
/* Hide the menu bar and the dock */
|
||||
[ NSMenu setMenuBarVisible:!full_screen ];
|
||||
|
||||
this->UpdateVideoModes();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ bool VideoDriver::Tick()
|
||||
}
|
||||
|
||||
/* Prevent drawing when switching mode, as windows can be removed when they should still appear. */
|
||||
if (this->HasGUI() && cur_ticks >= this->next_draw_tick && (_switch_mode == SM_NONE || HasModalProgress())) {
|
||||
if (this->HasGUI() && cur_ticks >= this->next_draw_tick && (_switch_mode == SM_NONE || _game_mode == GM_BOOTSTRAP || HasModalProgress())) {
|
||||
this->next_draw_tick += this->GetDrawInterval();
|
||||
/* Avoid next_draw_tick getting behind more and more if it cannot keep up. */
|
||||
if (this->next_draw_tick < cur_ticks - ALLOWED_DRIFT * this->GetDrawInterval()) this->next_draw_tick = cur_ticks;
|
||||
|
||||
@@ -138,7 +138,7 @@ bool VideoDriver_Win32Base::MakeWindow(bool full_screen)
|
||||
_fullscreen = full_screen;
|
||||
|
||||
/* recreate window? */
|
||||
if ((full_screen || this->fullscreen) && this->main_wnd) {
|
||||
if ((full_screen != this->fullscreen) && this->main_wnd) {
|
||||
DestroyWindow(this->main_wnd);
|
||||
this->main_wnd = 0;
|
||||
}
|
||||
@@ -716,7 +716,9 @@ LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
if (video_driver->fullscreen) {
|
||||
if (active && minimized) {
|
||||
/* Restore the game window */
|
||||
Dimension d = _bck_resolution; // Save current non-fullscreen window size as it will be overwritten by ShowWindow.
|
||||
ShowWindow(hwnd, SW_RESTORE);
|
||||
_bck_resolution = d;
|
||||
video_driver->MakeWindow(true);
|
||||
} else if (!active && !minimized) {
|
||||
/* Minimise the window and restore desktop */
|
||||
|
||||
Reference in New Issue
Block a user