mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-28 00:33:34 +01:00
GraphicsContext: Abstract away things like swapbuffers etc before adding even more backends.
Needed to prevent clutter all over the codebase. Does not go all the way yet, goal would be a common render loop between platforms but not there yet.
This commit is contained in:
1 parent
16053c08a0
commit
15de6e6b98
38 files changed
+230
-145
No files matched your search
@@ -288,12 +288,10 @@ namespace MainWindow
|
||||
}
|
||||
|
||||
void ToggleFullscreen(HWND hWnd, bool goingFullscreen) {
|
||||
GraphicsContext *graphicsContext = PSP_CoreParameter().graphicsContext;
|
||||
// Make sure no rendering is happening during the switch.
|
||||
|
||||
bool isOpenGL = g_Config.iGPUBackend == GPU_BACKEND_OPENGL;
|
||||
|
||||
if (isOpenGL) {
|
||||
GL_Pause();
|
||||
if (graphicsContext) {
|
||||
graphicsContext->Pause();
|
||||
}
|
||||
|
||||
int oldWindowState = g_WindowState;
|
||||
@@ -355,8 +353,8 @@ namespace MainWindow
|
||||
|
||||
WindowsRawInput::NotifyMenu();
|
||||
|
||||
if (isOpenGL) {
|
||||
GL_Resume();
|
||||
if (graphicsContext) {
|
||||
graphicsContext->Resume();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user