1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Disable rendering when config dialog is open to prevent plugin crash if

new settings are incompatible with the current ones.
This commit is contained in:
Sergey Lipskiy 2015-05-01 17:08:51 +06:00
parent 831b3410ed
commit 143cee1712
5 changed files with 14 additions and 0 deletions

View File

@ -9,3 +9,5 @@ u8 *RDRAM;
u32 RDRAMSize;
N64Regs REG;
bool ConfigOpen = false;

View File

@ -47,6 +47,7 @@ extern u8 *IMEM;
extern u8 *RDRAM;
extern u64 TMEM[TMEM_SIZE];
extern u32 RDRAMSize;
extern bool ConfigOpen;
#endif

View File

@ -137,6 +137,11 @@ void RSP_CheckDLCounter()
void RSP_ProcessDList()
{
if (ConfigOpen) {
gDPFullSync();
return;
}
RSP.PC[0] = *(u32*)&DMEM[0x0FF0];
RSP.PCi = 0;
RSP.count = -1;

View File

@ -91,6 +91,9 @@ void VI_UpdateScreen()
if (VI.lastOrigin == -1) // Workaround for Mupen64Plus issue with initialization
isGLError();
if (ConfigOpen)
return;
OGLVideo & ogl = video();
if (ogl.changeWindow())
return;

View File

@ -1,4 +1,5 @@
#include "GLideN64_Windows.h"
#include "../N64.h"
#include "../Config.h"
#include "../RSP.h"
#include "../PluginAPI.h"
@ -12,11 +13,13 @@ void Config_DoConfig(/*HWND hParent*/)
wchar_t strIniFolderPath[PLUGIN_PATH_SIZE];
api().FindPluginPath(strIniFolderPath);
ConfigOpen = true;
const bool bRestart = RunConfig(strIniFolderPath);
if (config.generalEmulation.enableCustomSettings != 0)
LoadCustomRomSettings(strIniFolderPath, RSP.romname);
if (bRestart)
video().restart();
ConfigOpen = false;
}
void Config_LoadConfig()