Extend our OSD class to support callbacks on init, onframe, and shutdown.

This commit is contained in:
Ryan Houdek
2013-04-13 00:48:53 -05:00
parent ccf1cee203
commit 39a7096711
6 changed files with 79 additions and 9 deletions

View File

@ -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();
}