(PS3) Swap is blocked before going into ingame menu - and unblocked

after exiting ingame menu
This commit is contained in:
TwinAphex51224 2012-01-21 17:50:21 +01:00
parent 26cb567bb9
commit 3695cf78b9
3 changed files with 23 additions and 1 deletions

View File

@ -225,6 +225,8 @@ static void ingame_menu(void)
uint32_t menuitem_colors[MENU_ITEM_LAST];
char comment[256], msg_temp[256];
ps3_block_swap();
do
{
uint64_t state = cell_pad_input_poll_device(0);
@ -481,6 +483,8 @@ static void ingame_menu(void)
old_state = state;
cellSysutilCheckCallback();
}while(g_console.in_game_menu);
ps3_unblock_swap();
}
// Temporary, a more sane implementation should go here.

View File

@ -93,6 +93,7 @@ typedef struct gl
PSGLdevice* gl_device;
PSGLcontext* gl_context;
bool vsync;
bool block_swap;
GLuint texture[TEXTURES];
unsigned tex_index; // For use with PREV.
struct gl_tex_info prev_info[TEXTURES];
@ -723,7 +724,8 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
cellDbgFontDraw();
}
psglSwap();
if(!gl->block_swap)
psglSwap();
return true;
}
@ -1094,6 +1096,20 @@ const char * ps3_get_resolution_label(uint32_t resolution)
}
}
void ps3_block_swap (void)
{
gl_t *gl = g_gl;
gl->block_swap = true;
SSNES_LOG("Swap is set to blocked\n");
}
void ps3_unblock_swap (void)
{
gl_t *gl = g_gl;
gl->block_swap = false;
SSNES_LOG("Swap is set to non-blocked\n");
}
// PS3 needs a working graphics stack before SSNES even starts.
// To deal with this main.c,
// the top level module owns the instance, and is created beforehand.

View File

@ -31,6 +31,8 @@ void ps3_next_resolution (void);
void ps3_previous_resolution (void);
const char * ps3_get_resolution_label(uint32_t resolution);
int ps3_check_resolution(uint32_t resolution_id);
void ps3_block_swap (void);
void ps3_unblock_swap (void);
extern void *g_gl;