mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-22 13:09:38 +01:00
Basically, the window was not invalidated, so it was never redrawn. This made it look like it wasn't working, but it really was.
This commit is contained in:
parent
d3179709b1
commit
04db99749b
@ -201,6 +201,7 @@ bool VideoDriver_Cocoa::ToggleFullscreen(bool full_screen)
|
|||||||
[ NSMenu setMenuBarVisible:!full_screen ];
|
[ NSMenu setMenuBarVisible:!full_screen ];
|
||||||
|
|
||||||
this->UpdateVideoModes();
|
this->UpdateVideoModes();
|
||||||
|
InvalidateWindowClassesData(WC_GAME_OPTIONS, 3);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -761,6 +761,7 @@ bool VideoDriver_SDL_Base::ToggleFullscreen(bool fullscreen)
|
|||||||
DEBUG(driver, 0, "SDL_SetWindowFullscreen() failed: %s", SDL_GetError());
|
DEBUG(driver, 0, "SDL_SetWindowFullscreen() failed: %s", SDL_GetError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InvalidateWindowClassesData(WC_GAME_OPTIONS, 3);
|
||||||
return ret == 0;
|
return ret == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -763,6 +763,7 @@ bool VideoDriver_SDL::ToggleFullscreen(bool fullscreen)
|
|||||||
_fullscreen ^= true;
|
_fullscreen ^= true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InvalidateWindowClassesData(WC_GAME_OPTIONS, 3);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -967,7 +967,10 @@ bool VideoDriver_Win32Base::ToggleFullscreen(bool full_screen)
|
|||||||
std::unique_lock<std::recursive_mutex> lock;
|
std::unique_lock<std::recursive_mutex> lock;
|
||||||
if (this->draw_mutex != nullptr) lock = std::unique_lock<std::recursive_mutex>(*this->draw_mutex);
|
if (this->draw_mutex != nullptr) lock = std::unique_lock<std::recursive_mutex>(*this->draw_mutex);
|
||||||
|
|
||||||
return this->MakeWindow(full_screen);
|
bool res = this->MakeWindow(full_screen);
|
||||||
|
|
||||||
|
InvalidateWindowClassesData(WC_GAME_OPTIONS, 3);
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoDriver_Win32Base::AcquireBlitterLock()
|
void VideoDriver_Win32Base::AcquireBlitterLock()
|
||||||
|
Loading…
Reference in New Issue
Block a user