mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -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:
@ -24,6 +24,7 @@
|
||||
#include "RenderBase.h"
|
||||
#include "VideoBackendBase.h"
|
||||
#include "Core.h"
|
||||
#include "Host.h"
|
||||
|
||||
namespace EmuWindow
|
||||
{
|
||||
@ -190,7 +191,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||
if (m_hParent == NULL)
|
||||
{
|
||||
// Stop the game
|
||||
PostMessage(m_hParent, WM_USER, WM_USER_STOP, 0);
|
||||
//PostMessage(m_hParent, WM_USER, WM_USER_STOP, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -319,7 +320,7 @@ HWND Create(HWND hParent, HINSTANCE hInstance, const TCHAR *title)
|
||||
// 3. Request window sizes which actually make the client area map to a common resolution
|
||||
HWND Ret;
|
||||
int x=0, y=0, width=640, height=480;
|
||||
Core::Callback_VideoGetWindowSize(x, y, width, height);
|
||||
Host_GetRenderWindowSize(x, y, width, height);
|
||||
|
||||
// TODO: Don't show if fullscreen
|
||||
Ret = OpenWindow(hParent, hInstance, width, height, title);
|
||||
|
@ -213,7 +213,7 @@ bool FifoCommandRunnable()
|
||||
"* Some other sort of bug\n\n"
|
||||
"Dolphin will now likely crash or hang. Enjoy." , cmd_byte);
|
||||
Host_SysMessage(szTemp);
|
||||
Core::Callback_VideoLog(szTemp);
|
||||
INFO_LOG(VIDEO, "%s", szTemp);
|
||||
{
|
||||
SCPFifoStruct &fifo = CommandProcessor::fifo;
|
||||
|
||||
@ -238,7 +238,7 @@ bool FifoCommandRunnable()
|
||||
,fifo.bFF_Breakpoint ? "true" : "false");
|
||||
|
||||
Host_SysMessage(szTmp);
|
||||
Core::Callback_VideoLog(szTmp);
|
||||
INFO_LOG(VIDEO, "%s", szTmp);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "Fifo.h"
|
||||
#include "Timer.h"
|
||||
#include "StringUtil.h"
|
||||
#include "Host.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
@ -318,6 +319,19 @@ void Renderer::CalculateXYScale(const TargetRectangle& dst_rect)
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
Host_RequestRenderWindowSize(width, height);
|
||||
}
|
||||
|
||||
void UpdateViewport()
|
||||
{
|
||||
g_renderer->UpdateViewport();
|
||||
|
@ -84,6 +84,8 @@ public:
|
||||
static float GetXFBScaleX() { return xScale; }
|
||||
static float GetXFBScaleY() { return yScale; }
|
||||
|
||||
static void SetWindowSize(int width, int height);
|
||||
|
||||
// EFB coordinate conversion functions
|
||||
|
||||
// Use this to convert a whole native EFB rect to backbuffer coordinates
|
||||
|
Reference in New Issue
Block a user