mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-27 00:03:37 +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
@@ -117,8 +117,10 @@ unsigned int WINAPI TheThread(void *)
|
||||
|
||||
host->UpdateUI();
|
||||
|
||||
GraphicsContext *graphicsContext;
|
||||
|
||||
std::string error_string;
|
||||
if (!host->InitGraphics(&error_string)) {
|
||||
if (!host->InitGraphics(&error_string, &graphicsContext)) {
|
||||
I18NCategory *err = GetI18NCategory("Error");
|
||||
Reporting::ReportMessage("Graphics init error: %s", error_string.c_str());
|
||||
|
||||
@@ -154,7 +156,9 @@ unsigned int WINAPI TheThread(void *)
|
||||
ExitProcess(1);
|
||||
}
|
||||
|
||||
NativeInitGraphics();
|
||||
PSP_CoreParameter().graphicsContext = graphicsContext;
|
||||
|
||||
NativeInitGraphics(graphicsContext);
|
||||
NativeResized();
|
||||
|
||||
INFO_LOG(BOOT, "Done.");
|
||||
@@ -179,7 +183,7 @@ unsigned int WINAPI TheThread(void *)
|
||||
if (!Core_IsActive())
|
||||
UpdateUIState(UISTATE_MENU);
|
||||
|
||||
Core_Run();
|
||||
Core_Run(graphicsContext);
|
||||
}
|
||||
|
||||
shutdown:
|
||||
|
||||
Reference in new issue
Block a user