mirror of
https://github.com/dborth/snes9xgx.git
synced 2025-02-03 05:32:32 +01:00
original mode corrections
This commit is contained in:
parent
dc94f29f4d
commit
ea88db00e2
@ -14,6 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wiiuse/wpad.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef HW_RVL
|
||||
extern "C" {
|
||||
|
@ -204,6 +204,8 @@ void setFrameTimerMethod()
|
||||
extern void S9xInitSync();
|
||||
bool CheckVideo = 0; // for forcing video reset in video.cpp
|
||||
extern uint32 prevRenderedFrameCount;
|
||||
static int videoReset;
|
||||
static int currentMode;
|
||||
|
||||
void
|
||||
emulate ()
|
||||
@ -238,7 +240,6 @@ emulate ()
|
||||
// since we're starting emulation again
|
||||
LWP_SuspendThread (devicethread);
|
||||
|
||||
ResetVideo_Emu();
|
||||
AudioStart ();
|
||||
|
||||
FrameTimer = 0;
|
||||
@ -247,6 +248,9 @@ emulate ()
|
||||
CheckVideo = 1; // force video update
|
||||
prevRenderedFrameCount = IPPU.RenderedFramesCount;
|
||||
|
||||
videoReset = -1;
|
||||
currentMode = GCSettings.render;
|
||||
|
||||
while(1) // emulation loop
|
||||
{
|
||||
S9xMainLoop ();
|
||||
@ -258,13 +262,24 @@ emulate ()
|
||||
ResetRequested = 0;
|
||||
}
|
||||
if (ConfigRequested)
|
||||
{
|
||||
if((GCSettings.render != 0 && videoReset == -1) || videoReset == 0)
|
||||
{
|
||||
FreeGfxMem();
|
||||
TakeScreenshot();
|
||||
ResetVideo_Menu();
|
||||
ConfigRequested = 0;
|
||||
GCSettings.render = currentMode;
|
||||
break; // leave emulation loop
|
||||
}
|
||||
else if(videoReset == -1)
|
||||
{
|
||||
GCSettings.render = 2;
|
||||
CheckVideo = 1;
|
||||
videoReset = 2;
|
||||
}
|
||||
videoReset--;
|
||||
}
|
||||
} // emulation loop
|
||||
} // main loop
|
||||
}
|
||||
|
@ -19,8 +19,6 @@
|
||||
#include <unistd.h>
|
||||
#include <wiiuse/wpad.h>
|
||||
#include <ogc/texconv.h>
|
||||
#include <mp3player.h>
|
||||
#include <asndlib.h>
|
||||
|
||||
#include "snes9x.h"
|
||||
#include "memmap.h"
|
||||
@ -632,17 +630,25 @@ InitGCVideo ()
|
||||
void
|
||||
ResetVideo_Emu ()
|
||||
{
|
||||
GXRModeObj *rmode;
|
||||
GXRModeObj *rmode = vmode;
|
||||
Mtx44 p;
|
||||
|
||||
int i = -1;
|
||||
if (GCSettings.render == 0) // original render mode
|
||||
|
||||
// original render mode or hq2x
|
||||
if (GCSettings.render == 0 || GCSettings.FilterMethod != FILTER_NONE)
|
||||
{
|
||||
for (i=0; i<4; i++)
|
||||
for (int j=0; j<4; j++)
|
||||
{
|
||||
if (tvmodes[i]->efbHeight == vheight)
|
||||
if (tvmodes[j]->efbHeight == vheight)
|
||||
{
|
||||
i = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(i >= 0) // we found a matching original mode
|
||||
{
|
||||
rmode = tvmodes[i];
|
||||
|
||||
// hack to fix video output for hq2x
|
||||
|
Loading…
x
Reference in New Issue
Block a user