mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 00:15:14 +01:00
disable second screen tex buffer for gamecube users
This commit is contained in:
parent
87a984a40a
commit
18f586f15a
@ -189,7 +189,7 @@ done:
|
||||
FreeSaveBuffer ();
|
||||
|
||||
// save screenshot - I would prefer to do this from gameScreenTex
|
||||
if(gameScreenTex != NULL && method != METHOD_MC_SLOTA && method != METHOD_MC_SLOTB)
|
||||
if(gameScreenTex2 != NULL && method != METHOD_MC_SLOTA && method != METHOD_MC_SLOTB)
|
||||
{
|
||||
AllocSaveBuffer ();
|
||||
|
||||
@ -197,7 +197,7 @@ done:
|
||||
|
||||
if (pngContext != NULL)
|
||||
{
|
||||
imgSize = PNGU_EncodeFromGXTexture(pngContext, 640, 480, gameScreenTex, 0);
|
||||
imgSize = PNGU_EncodeFromGXTexture(pngContext, 640, 480, gameScreenTex2, 0);
|
||||
PNGU_ReleaseImageContext(pngContext);
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,11 @@ void GuiSaveBrowser::Update(GuiTrigger * t)
|
||||
int i, len;
|
||||
char savetext[50];
|
||||
// update the location of the scroll box based on the position in the option list
|
||||
int position = 136*(listOffset+selectedItem)/saves->length;
|
||||
int position;
|
||||
if(action == 0)
|
||||
position = 136*(listOffset+selectedItem)/saves->length;
|
||||
else
|
||||
position = 136*(listOffset+selectedItem+2)/saves->length;
|
||||
|
||||
if(position > 130)
|
||||
position = 136;
|
||||
|
@ -1286,10 +1286,13 @@ static int MenuGame()
|
||||
mainWindow->Remove(gameScreenImg);
|
||||
delete gameScreenImg;
|
||||
gameScreenImg = NULL;
|
||||
}
|
||||
if(gameScreenTex)
|
||||
{
|
||||
free(gameScreenTex);
|
||||
gameScreenTex = NULL;
|
||||
bgImg->SetVisible(true);
|
||||
}
|
||||
bgImg->SetVisible(true);
|
||||
#ifndef NO_SOUND
|
||||
bgMusic->Play(); // startup music
|
||||
#endif
|
||||
@ -3240,7 +3243,7 @@ MainMenu (int menu)
|
||||
|
||||
if(gameScreenTex)
|
||||
{
|
||||
gameScreenImg = new GuiImage(gameScreenTex2, screenwidth, screenheight);
|
||||
gameScreenImg = new GuiImage(gameScreenTex, screenwidth, screenheight);
|
||||
gameScreenImg->SetAlpha(192);
|
||||
//gameScreenImg->SetStripe(100);
|
||||
gameScreenImg->ColorStripe(30);
|
||||
@ -3381,6 +3384,9 @@ MainMenu (int menu)
|
||||
{
|
||||
free(gameScreenTex);
|
||||
gameScreenTex = NULL;
|
||||
}
|
||||
if(gameScreenTex2)
|
||||
{
|
||||
free(gameScreenTex2);
|
||||
gameScreenTex2 = NULL;
|
||||
}
|
||||
|
@ -868,20 +868,22 @@ setGFX ()
|
||||
*/
|
||||
void TakeScreenshot()
|
||||
{
|
||||
if(gameScreenTex)
|
||||
free(gameScreenTex);
|
||||
|
||||
if(gameScreenTex) free(gameScreenTex);
|
||||
gameScreenTex = (u8 *)memalign(32, vmode->fbWidth * vmode->efbHeight * 4);
|
||||
gameScreenTex2 = (u8 *)memalign(32, vmode->fbWidth * vmode->efbHeight * 4);
|
||||
if(gameScreenTex == NULL || gameScreenTex2 == NULL)
|
||||
return;
|
||||
if(gameScreenTex == NULL) return;
|
||||
GX_SetTexCopySrc(0, 0, vmode->fbWidth, vmode->efbHeight);
|
||||
GX_SetTexCopyDst(vmode->fbWidth, vmode->efbHeight, GX_TF_RGBA8, GX_FALSE);
|
||||
GX_CopyTex(gameScreenTex, GX_FALSE);
|
||||
GX_CopyTex(gameScreenTex2, GX_FALSE);
|
||||
GX_PixModeSync();
|
||||
DCFlushRange(gameScreenTex, vmode->fbWidth * vmode->efbHeight * 4);
|
||||
|
||||
#ifdef HW_RVL
|
||||
if(gameScreenTex2) free(gameScreenTex2);
|
||||
gameScreenTex2 = (u8 *)memalign(32, vmode->fbWidth * vmode->efbHeight * 4);
|
||||
if(gameScreenTex2 == NULL) return;
|
||||
memcpy(gameScreenTex2, gameScreenTex, vmode->fbWidth * vmode->efbHeight * 4)
|
||||
DCFlushRange(gameScreenTex2, vmode->fbWidth * vmode->efbHeight * 4);
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user