mirror of https://github.com/snes9xgit/snes9x.git
Revert "win32: Make changes to display driver not occur until restart."
This reverts commit 39e21410d8
.
This commit is contained in:
parent
e81edf83a6
commit
5e02a77d59
|
@ -42,7 +42,7 @@ DWMFLUSHPROC DwmFlushProc = NULL;
|
|||
DWMISCOMPOSITIONENABLEDPROC DwmIsCompositionEnabledProc = NULL;
|
||||
|
||||
// Interface used to access the display output
|
||||
IS9xDisplayOutput* S9xDisplayOutput = NULL;
|
||||
IS9xDisplayOutput *S9xDisplayOutput=&Direct3D;
|
||||
|
||||
#ifndef max
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
@ -95,8 +95,16 @@ void WinRefreshDisplay(void)
|
|||
|
||||
void WinChangeWindowSize(unsigned int newWidth, unsigned int newHeight)
|
||||
{
|
||||
if (S9xDisplayOutput)
|
||||
S9xDisplayOutput->ChangeRenderSize(newWidth,newHeight);
|
||||
S9xDisplayOutput->ChangeRenderSize(newWidth,newHeight);
|
||||
}
|
||||
|
||||
static void FlushMessageQueue()
|
||||
{
|
||||
for (MSG msg; PeekMessage(&msg, GUI.hWnd, 0, 0, PM_NOREMOVE);)
|
||||
{
|
||||
GetMessage(&msg, GUI.hWnd, 0, 0);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
/* WinDisplayReset
|
||||
|
@ -107,9 +115,10 @@ returns true if successful, false otherwise
|
|||
*/
|
||||
bool WinDisplayReset(void)
|
||||
{
|
||||
if (S9xDisplayOutput == NULL)
|
||||
{
|
||||
switch (GUI.outputMethod) {
|
||||
S9xDisplayOutput->DeInitialize();
|
||||
FlushMessageQueue();
|
||||
|
||||
switch(GUI.outputMethod) {
|
||||
default:
|
||||
case DIRECT3D:
|
||||
S9xDisplayOutput = &Direct3D;
|
||||
|
@ -125,10 +134,8 @@ bool WinDisplayReset(void)
|
|||
case VULKAN:
|
||||
S9xDisplayOutput = &VulkanDriver;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
S9xDisplayOutput->DeInitialize();
|
||||
bool initialized = S9xDisplayOutput->Initialize(GUI.hWnd);
|
||||
|
||||
if (!initialized) {
|
||||
|
|
|
@ -7783,9 +7783,14 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
OutputMethod newOut = (OutputMethod)SendDlgItemMessage(hDlg, IDC_OUTPUTMETHOD, CB_GETITEMDATA, index, 0);
|
||||
if(GUI.outputMethod==newOut)
|
||||
break;
|
||||
|
||||
if(GUI.FullScreen)
|
||||
ToggleFullScreen();
|
||||
GUI.outputMethod=newOut;
|
||||
MessageBox(hDlg, TEXT("Changes to graphics output method will take place when Snes9x is restarted."), TEXT("Snes9x Display"), MB_OK | MB_ICONINFORMATION);
|
||||
|
||||
WinDisplayReset();
|
||||
UpdateModeComboBox(GetDlgItem(hDlg,IDC_RESOLUTION));
|
||||
WinRefreshDisplay();
|
||||
UpdateWindow(GUI.hWnd);
|
||||
}
|
||||
break;
|
||||
case IDC_SHADER_ENABLED:
|
||||
|
|
Loading…
Reference in New Issue