mirror of
https://github.com/dborth/fceugx.git
synced 2025-01-05 21:38:17 +01:00
small bugfixes
This commit is contained in:
parent
0e1c0985f9
commit
47c65f5ebe
@ -282,7 +282,7 @@ int main(int argc, char *argv[])
|
||||
LWP_SuspendThread (devicethread);
|
||||
|
||||
ResetVideo_Emu();
|
||||
|
||||
SetControllers();
|
||||
setFrameTimer(); // set frametimer method before emulation
|
||||
SetPalette();
|
||||
|
||||
|
@ -98,8 +98,6 @@ int GCMemROM(int method, int size)
|
||||
FCEUI_SetSoundVolume(100); // 0-100
|
||||
FCEUI_SetLowPass(0);
|
||||
|
||||
InitialisePads();
|
||||
|
||||
MakeFCEUFile((char *) nesrom, size);
|
||||
|
||||
nesGameType = 0;
|
||||
|
@ -642,7 +642,7 @@ ResetVideo_Emu ()
|
||||
|
||||
GX_SetDispCopySrc (0, 0, rmode->fbWidth, rmode->efbHeight);
|
||||
GX_SetDispCopyDst (rmode->fbWidth, rmode->xfbHeight);
|
||||
GX_SetCopyFilter (rmode->aa, rmode->sample_pattern, (GCSettings.render == 1) ? GX_TRUE : GX_FALSE, rmode->vfilter); // deflickering filter only for filtered mode
|
||||
GX_SetCopyFilter (rmode->aa, rmode->sample_pattern, (GCSettings.render == 1) ? GX_TRUE : GX_FALSE, rmode->vfilter); // deflicker ON only for filtered mode
|
||||
|
||||
GX_SetFieldMode (rmode->field_rendering, ((rmode->viHeight == 2 * rmode->xfbHeight) ? GX_ENABLE : GX_DISABLE));
|
||||
GX_SetPixelFmt (GX_PF_RGB8_Z24, GX_ZC_LINEAR);
|
||||
@ -650,7 +650,7 @@ ResetVideo_Emu ()
|
||||
GX_SetZMode (GX_TRUE, GX_LEQUAL, GX_TRUE);
|
||||
GX_SetColorUpdate (GX_TRUE);
|
||||
|
||||
guOrtho(p, rmode->efbHeight/2, -(rmode->efbHeight/2), -(rmode->fbWidth/2), rmode->fbWidth/2, 10, 1000); // matrix, t, b, l, r, n, f
|
||||
guOrtho(p, rmode->efbHeight/2, -(rmode->efbHeight/2), -(rmode->fbWidth/2), rmode->fbWidth/2, 100, 1000); // matrix, t, b, l, r, n, f
|
||||
GX_LoadProjectionMtx (p, GX_ORTHOGRAPHIC);
|
||||
|
||||
// reinitialize texture
|
||||
|
@ -1165,7 +1165,7 @@ static int MenuGame()
|
||||
GuiImage resetBtnIcon(&iconReset);
|
||||
GuiButton resetBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
resetBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
resetBtn.SetPosition(-125, 250);
|
||||
resetBtn.SetPosition(125, 250);
|
||||
resetBtn.SetLabel(&resetBtnTxt);
|
||||
resetBtn.SetImage(&resetBtnImg);
|
||||
resetBtn.SetImageOver(&resetBtnImgOver);
|
||||
@ -1180,7 +1180,7 @@ static int MenuGame()
|
||||
GuiImage controllerBtnIcon(&iconController);
|
||||
GuiButton controllerBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
controllerBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
controllerBtn.SetPosition(125, 250);
|
||||
controllerBtn.SetPosition(-125, 250);
|
||||
controllerBtn.SetLabel(&controllerBtnTxt);
|
||||
controllerBtn.SetImage(&controllerBtnImg);
|
||||
controllerBtn.SetImageOver(&controllerBtnImgOver);
|
||||
@ -1632,7 +1632,7 @@ static int MenuGameSaves(int action)
|
||||
}
|
||||
else // save
|
||||
{
|
||||
if(ret == 0) // new SRAM
|
||||
if(ret == 0) // new RAM
|
||||
{
|
||||
for(i=1; i < 100; i++)
|
||||
if(saves.files[FILE_RAM][i] == 0)
|
||||
@ -1658,7 +1658,7 @@ static int MenuGameSaves(int action)
|
||||
menu = MENU_GAME_SAVE;
|
||||
}
|
||||
}
|
||||
else // overwrite SRAM/Snapshot
|
||||
else // overwrite RAM/State
|
||||
{
|
||||
MakeFilePath(filepath, saves.type[ret-2], method, saves.filename[ret-2]);
|
||||
switch(saves.type[ret-2])
|
||||
@ -2504,7 +2504,7 @@ static int MenuSettingsMappingsMap()
|
||||
GuiOptionBrowser optionBrowser(552, 248, &options);
|
||||
optionBrowser.SetPosition(0, 108);
|
||||
optionBrowser.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
optionBrowser.SetCol2Position(180);
|
||||
optionBrowser.SetCol2Position(280);
|
||||
|
||||
HaltGui();
|
||||
GuiWindow w(screenwidth, screenheight);
|
||||
@ -3024,12 +3024,12 @@ static int MenuSettingsFile()
|
||||
snprintf (options.value[4], 256, "%s", GCSettings.CheatFolder);
|
||||
|
||||
if (GCSettings.AutoLoad == 0) sprintf (options.value[5],"Off");
|
||||
else if (GCSettings.AutoLoad == 1) sprintf (options.value[5],"SRAM");
|
||||
else if (GCSettings.AutoLoad == 2) sprintf (options.value[5],"Snapshot");
|
||||
else if (GCSettings.AutoLoad == 1) sprintf (options.value[5],"RAM");
|
||||
else if (GCSettings.AutoLoad == 2) sprintf (options.value[5],"State");
|
||||
|
||||
if (GCSettings.AutoSave == 0) sprintf (options.value[5],"Off");
|
||||
else if (GCSettings.AutoSave == 1) sprintf (options.value[6],"SRAM");
|
||||
else if (GCSettings.AutoSave == 2) sprintf (options.value[6],"Snapshot");
|
||||
else if (GCSettings.AutoSave == 1) sprintf (options.value[6],"RAM");
|
||||
else if (GCSettings.AutoSave == 2) sprintf (options.value[6],"State");
|
||||
else if (GCSettings.AutoSave == 3) sprintf (options.value[6],"Both");
|
||||
|
||||
sprintf (options.value[7], "%s", GCSettings.VerifySaves == true ? "On" : "Off");
|
||||
|
@ -140,6 +140,8 @@ void SetControllers()
|
||||
if(!romLoaded)
|
||||
return;
|
||||
|
||||
InputDPR = &JSReturn;
|
||||
|
||||
if(GCSettings.Controller == CTRL_PAD4)
|
||||
FCEUI_DisableFourScore(false);
|
||||
else
|
||||
@ -158,24 +160,14 @@ void SetControllers()
|
||||
|
||||
if(GCSettings.Controller == CTRL_ZAPPER)
|
||||
{
|
||||
// enable Zapper
|
||||
int z = 1;
|
||||
zapperdata[z] = FCEU_InitZapper(z);
|
||||
FCEUI_SetInput(z, SI_ZAPPER, myzappers[z], 1);
|
||||
int p;
|
||||
if(nesGameType == 2) p = 0;
|
||||
else p = 1;
|
||||
zapperdata[p] = FCEU_InitZapper(p);
|
||||
FCEUI_SetInput(p, SI_ZAPPER, myzappers[p], 1);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Initialise Pads
|
||||
***************************************************************************/
|
||||
void InitialisePads()
|
||||
{
|
||||
InputDPR = &JSReturn;
|
||||
FCEUI_SetInput(0, SI_GAMEPAD, InputDPR, 0);
|
||||
FCEUI_SetInput(1, SI_GAMEPAD, InputDPR, 0);
|
||||
SetControllers();
|
||||
}
|
||||
|
||||
#ifdef HW_RVL
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -64,15 +64,13 @@ extern GuiTrigger userInput[4];
|
||||
extern int rumbleRequest[4];
|
||||
extern u32 btnmap[2][4][12];
|
||||
|
||||
void SetControllers();
|
||||
void ResetControls();
|
||||
void ShutoffRumble();
|
||||
void DoRumble(int i);
|
||||
s8 WPAD_StickX(u8 chan,u8 right);
|
||||
s8 WPAD_StickY(u8 chan, u8 right);
|
||||
void InitialisePads();
|
||||
void GetJoy();
|
||||
void ToggleFourScore(int set);
|
||||
void ToggleZapper(int set);
|
||||
void DrawCursor();
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user