mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
A bit of cleanup to Core Init/Stop, Frame, and Main. Cleanup XAudio2 to attempt to fix the crash on stop(didn't help :p). For some reason CFrame::DoStop is called twice.(might be the issue)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7353 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -41,6 +41,7 @@
|
||||
#include "Core.h"
|
||||
#include "OnFrame.h"
|
||||
#include "Television.h"
|
||||
#include "Host.h"
|
||||
|
||||
namespace DX11
|
||||
{
|
||||
@ -321,7 +322,7 @@ Renderer::Renderer()
|
||||
int x, y, w_temp, h_temp;
|
||||
s_blendMode = 0;
|
||||
|
||||
Core::Callback_VideoGetWindowSize(x, y, w_temp, h_temp);
|
||||
Host_GetRenderWindowSize(x, y, w_temp, h_temp);
|
||||
|
||||
D3D::Create(EmuWindow::GetWnd());
|
||||
|
||||
@ -445,19 +446,6 @@ bool Renderer::CheckForResize()
|
||||
return false;
|
||||
}
|
||||
|
||||
void Renderer::SetWindowSize(int width, int height)
|
||||
{
|
||||
if (width < 1)
|
||||
width = 1;
|
||||
if (height < 1)
|
||||
height = 1;
|
||||
|
||||
// Scale the window size by the EFB scale.
|
||||
CalculateTargetScale(width, height, width, height);
|
||||
|
||||
Core::Callback_VideoRequestWindowSize(width, height);
|
||||
}
|
||||
|
||||
bool Renderer::SetScissorRect()
|
||||
{
|
||||
TargetRectangle rc;
|
||||
|
@ -51,7 +51,6 @@ public:
|
||||
bool SaveScreenshot(const std::string &filename, const TargetRectangle &rc);
|
||||
|
||||
static bool CheckForResize();
|
||||
static void SetWindowSize(int width, int height);
|
||||
|
||||
void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4);
|
||||
void SetPSConstant4fv(unsigned int const_number, const float *f);
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "VertexLoaderManager.h"
|
||||
#include "VertexShaderManager.h"
|
||||
#include "Core.h"
|
||||
#include "Host.h"
|
||||
|
||||
#include "Debugger/DebuggerPanel.h"
|
||||
#include "DLCache.h"
|
||||
@ -204,7 +205,7 @@ void VideoBackend::Video_Prepare()
|
||||
DLCache::Init();
|
||||
|
||||
// Tell the host that the window is ready
|
||||
Core::Callback_CoreMessage(WM_USER_CREATE);
|
||||
Host_Message(WM_USER_CREATE);
|
||||
}
|
||||
|
||||
void VideoBackend::Shutdown()
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "Thread.h"
|
||||
#include "Timer.h"
|
||||
#include "Statistics.h"
|
||||
#include "Host.h"
|
||||
|
||||
#include "VideoConfig.h"
|
||||
#include "main.h"
|
||||
@ -258,7 +259,7 @@ Renderer::Renderer()
|
||||
// Multisample Anti-aliasing hasn't been implemented yet use supersamling instead
|
||||
int backbuffer_ms_mode = 0;
|
||||
|
||||
Core::Callback_VideoGetWindowSize(x, y, w_temp, h_temp);
|
||||
Host_GetRenderWindowSize(x, y, w_temp, h_temp);
|
||||
|
||||
for (fullScreenRes = 0; fullScreenRes < (int)D3D::GetAdapter(g_ActiveConfig.iAdapter).resolutions.size(); fullScreenRes++)
|
||||
{
|
||||
@ -425,19 +426,6 @@ bool Renderer::CheckForResize()
|
||||
return false;
|
||||
}
|
||||
|
||||
void Renderer::SetWindowSize(int width, int height)
|
||||
{
|
||||
if (width < 1)
|
||||
width = 1;
|
||||
if (height < 1)
|
||||
height = 1;
|
||||
|
||||
// Scale the window size by the EFB scale.
|
||||
CalculateTargetScale(width, height, width, height);
|
||||
|
||||
Core::Callback_VideoRequestWindowSize(width, height);
|
||||
}
|
||||
|
||||
bool Renderer::SetScissorRect()
|
||||
{
|
||||
TargetRectangle rc;
|
||||
|
@ -47,7 +47,6 @@ public:
|
||||
bool SaveScreenshot(const std::string &filename, const TargetRectangle &rc);
|
||||
|
||||
static bool CheckForResize();
|
||||
static void SetWindowSize(int width, int height);
|
||||
|
||||
void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4);
|
||||
void SetPSConstant4fv(unsigned int const_number, const float *f);
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include "DLCache.h"
|
||||
#include "IniFile.h"
|
||||
#include "Core.h"
|
||||
#include "Host.h"
|
||||
|
||||
#include "ConfigManager.h"
|
||||
#include "VideoBackend.h"
|
||||
@ -185,7 +186,7 @@ void VideoBackend::Video_Prepare()
|
||||
DLCache::Init();
|
||||
|
||||
// Notify the core that the video backend is ready
|
||||
Core::Callback_CoreMessage(WM_USER_CREATE);
|
||||
Host_Message(WM_USER_CREATE);
|
||||
}
|
||||
|
||||
void VideoBackend::Shutdown()
|
||||
|
@ -296,7 +296,7 @@ void XEventThread()
|
||||
case ClientMessage:
|
||||
if ((unsigned long) event.xclient.data.l[0] ==
|
||||
XInternAtom(GLWin.evdpy, "WM_DELETE_WINDOW", False))
|
||||
Core::Callback_CoreMessage(WM_USER_STOP);
|
||||
Host_Message(WM_USER_STOP);
|
||||
if ((unsigned long) event.xclient.data.l[0] ==
|
||||
XInternAtom(GLWin.evdpy, "RESIZE", False))
|
||||
XMoveResizeWindow(GLWin.evdpy, GLWin.win,
|
||||
@ -317,7 +317,7 @@ void XEventThread()
|
||||
bool OpenGL_Create(void *&window_handle)
|
||||
{
|
||||
int _tx, _ty, _twidth, _theight;
|
||||
Core::Callback_VideoGetWindowSize(_tx, _ty, _twidth, _theight);
|
||||
Host_GetRenderWindowSize(_tx, _ty, _twidth, _theight);
|
||||
|
||||
// Control window size and picture scaling
|
||||
s_backbuffer_width = _twidth;
|
||||
@ -519,7 +519,7 @@ bool OpenGL_MakeCurrent()
|
||||
return wglMakeCurrent(hDC, hRC) ? true : false;
|
||||
#elif defined(HAVE_X11) && HAVE_X11
|
||||
#if defined(HAVE_WX) && (HAVE_WX)
|
||||
Core::Callback_VideoGetWindowSize(GLWin.x, GLWin.y,
|
||||
Host_GetRenderWindowSize(GLWin.x, GLWin.y,
|
||||
(int&)GLWin.width, (int&)GLWin.height);
|
||||
XMoveResizeWindow(GLWin.dpy, GLWin.win, GLWin.x, GLWin.y,
|
||||
GLWin.width, GLWin.height);
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include "Debugger.h"
|
||||
#include "Core.h"
|
||||
#include "OnFrame.h"
|
||||
#include "Host.h"
|
||||
|
||||
#include "main.h" // Local
|
||||
#ifdef _WIN32
|
||||
@ -1613,17 +1614,4 @@ bool Renderer::SaveScreenshot(const std::string &filename, const TargetRectangle
|
||||
return result;
|
||||
}
|
||||
|
||||
void Renderer::SetWindowSize(int width, int height)
|
||||
{
|
||||
if (width < 1)
|
||||
width = 1;
|
||||
if (height < 1)
|
||||
height = 1;
|
||||
|
||||
// Scale the window size by the EFB scale.
|
||||
CalculateTargetScale(width, height, width, height);
|
||||
|
||||
Core::Callback_VideoRequestWindowSize(width, height);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -49,8 +49,6 @@ public:
|
||||
|
||||
bool SaveScreenshot(const std::string &filename, const TargetRectangle &rc);
|
||||
|
||||
void SetWindowSize(int width, int height);
|
||||
|
||||
void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4);
|
||||
void SetPSConstant4fv(unsigned int const_number, const float *f);
|
||||
void SetMultiPSConstant4fv(unsigned int const_number, unsigned int count, const float *f);
|
||||
|
@ -92,6 +92,7 @@ Make AA apply instantly during gameplay if possible
|
||||
#include "DLCache.h"
|
||||
#include "FramebufferManager.h"
|
||||
#include "Core.h"
|
||||
#include "Host.h"
|
||||
|
||||
#include "VideoState.h"
|
||||
#include "VideoBackend.h"
|
||||
@ -211,7 +212,7 @@ void VideoBackend::Video_Prepare()
|
||||
DLCache::Init();
|
||||
|
||||
// Notify the core that the video backend is ready
|
||||
Core::Callback_CoreMessage(WM_USER_CREATE);
|
||||
Host_Message(WM_USER_CREATE);
|
||||
}
|
||||
|
||||
void VideoBackend::Shutdown()
|
||||
|
@ -69,7 +69,7 @@ bool VideoBackend::Initialize(void *&window_handle)
|
||||
|
||||
if (!OpenGL_Create(window_handle))
|
||||
{
|
||||
Core::Callback_VideoLog("SWRenderer::Create failed\n");
|
||||
INFO_LOG(VIDEO, "%s", "SWRenderer::Create failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user