mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 00:15:14 +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 ();
|
||||
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
|
||||
|
@ -20,15 +20,15 @@ void AllocGfxMem();
|
||||
void FreeGfxMem();
|
||||
void InitGCVideo ();
|
||||
void StopGX();
|
||||
void ResetVideo_Emu ();
|
||||
void setGFX ();
|
||||
void ResetVideo_Emu();
|
||||
void setGFX();
|
||||
void update_video (int width, int height);
|
||||
void zoom (float speed);
|
||||
void zoom_reset ();
|
||||
|
||||
void ResetVideo_Menu ();
|
||||
void ResetVideo_Menu();
|
||||
void TakeScreenshot();
|
||||
void Menu_Render ();
|
||||
void Menu_Render();
|
||||
void Menu_DrawImg(f32 xpos, f32 ypos, u16 width, u16 height, u8 data[], f32 degrees, f32 scaleX, f32 scaleY, u8 alphaF );
|
||||
void Menu_DrawRectangle(f32 x, f32 y, f32 width, f32 height, GXColor color, u8 filled);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user