mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Extend our OSD class to support callbacks on init, onframe, and shutdown.
This commit is contained in:
@ -157,7 +157,10 @@ void VideoBackend::ShowConfig(void *_hParent)
|
||||
diag.ShowModal();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Test(u32 Data)
|
||||
{
|
||||
printf("Data: %d\n", Data);
|
||||
}
|
||||
bool VideoBackend::Initialize(void *&window_handle)
|
||||
{
|
||||
InitializeShared();
|
||||
@ -175,6 +178,9 @@ bool VideoBackend::Initialize(void *&window_handle)
|
||||
if (!GLInterface->Create(window_handle))
|
||||
return false;
|
||||
|
||||
// Do our OSD callbacks
|
||||
OSD::DoCallbacks(OSD::OSD_INIT);
|
||||
|
||||
s_BackendInitialized = true;
|
||||
|
||||
return true;
|
||||
@ -222,6 +228,10 @@ void VideoBackend::Video_Prepare()
|
||||
void VideoBackend::Shutdown()
|
||||
{
|
||||
s_BackendInitialized = false;
|
||||
|
||||
// Do our OSD callbacks
|
||||
OSD::DoCallbacks(OSD::OSD_SHUTDOWN);
|
||||
|
||||
GLInterface->Shutdown();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user