VideoSW: Split up OGL window handling
This removes OSD support for video software, but it was already broken before. This commit does not try to fix coding style issues, the rewrite of this presentation API is splitted up.
This commit is contained in:
1 parent
b0bbe52cc9
commit
61c3a0d9e4
9 files changed
+206
-413
No files matched your search
@@ -8,9 +8,6 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/GL/GLInterfaceBase.h"
|
||||
#include "Common/GL/GLUtil.h"
|
||||
#include "Common/GL/GLExtensions/GLExtensions.h"
|
||||
#include "Common/Logging/LogManager.h"
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
@@ -26,6 +23,7 @@
|
||||
#include "VideoBackends/Software/OpcodeDecoder.h"
|
||||
#include "VideoBackends/Software/Rasterizer.h"
|
||||
#include "VideoBackends/Software/SWCommandProcessor.h"
|
||||
#include "VideoBackends/Software/SWOGLWindow.h"
|
||||
#include "VideoBackends/Software/SWRenderer.h"
|
||||
#include "VideoBackends/Software/SWStatistics.h"
|
||||
#include "VideoBackends/Software/SWVertexLoader.h"
|
||||
@@ -81,13 +79,7 @@ bool VideoSoftware::Initialize(void *window_handle)
|
||||
{
|
||||
g_SWVideoConfig.Load((File::GetUserPath(D_CONFIG_IDX) + GetConfigName() + ".ini").c_str());
|
||||
|
||||
InitInterface();
|
||||
GLInterface->SetMode(GLInterfaceMode::MODE_DETECT);
|
||||
if (!GLInterface->Create(window_handle, false))
|
||||
{
|
||||
INFO_LOG(VIDEO, "GLInterface::Create failed.");
|
||||
return false;
|
||||
}
|
||||
SWOGLWindow::Init(window_handle);
|
||||
|
||||
InitBPMemory();
|
||||
InitXFMemory();
|
||||
@@ -165,31 +157,16 @@ void VideoSoftware::Shutdown()
|
||||
// Do our OSD callbacks
|
||||
OSD::DoCallbacks(OSD::OSD_SHUTDOWN);
|
||||
|
||||
GLInterface->Shutdown();
|
||||
delete GLInterface;
|
||||
GLInterface = nullptr;
|
||||
SWOGLWindow::Shutdown();
|
||||
}
|
||||
|
||||
void VideoSoftware::Video_Cleanup()
|
||||
{
|
||||
GLInterface->ClearCurrent();
|
||||
}
|
||||
|
||||
// This is called after Video_Initialize() from the Core
|
||||
void VideoSoftware::Video_Prepare()
|
||||
{
|
||||
GLInterface->MakeCurrent();
|
||||
|
||||
// Init extension support.
|
||||
if (!GLExtensions::Init())
|
||||
{
|
||||
ERROR_LOG(VIDEO, "GLExtensions::Init failed!Does your video card support OpenGL 2.0?");
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle VSync on/off
|
||||
GLInterface->SwapInterval(VSYNC_ENABLED);
|
||||
|
||||
// Do our OSD callbacks
|
||||
OSD::DoCallbacks(OSD::OSD_INIT);
|
||||
|
||||
@@ -367,7 +344,7 @@ void VideoSoftware::RegisterCPMMIO(MMIO::Mapping* mmio, u32 base)
|
||||
// Draw messages on top of the screen
|
||||
unsigned int VideoSoftware::PeekMessages()
|
||||
{
|
||||
return GLInterface->PeekMessages();
|
||||
return SWOGLWindow::s_instance->PeekMessages();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user