(GX) potential video memory corruption

This commit is contained in:
ToadKing 2013-01-06 19:02:33 -05:00
parent 8c8c3cc10b
commit 71bc5ae50d
2 changed files with 4 additions and 5 deletions

View File

@ -429,7 +429,6 @@ static void gx_input_poll(void *data)
*state_cur |= GX_WIIMOTE_HOME;
}
do_exit:
g_extern.lifecycle_state &= ~((1ULL << RARCH_FAST_FORWARD_HOLD_KEY) | (1ULL << RARCH_LOAD_STATE_KEY) | (1ULL << RARCH_SAVE_STATE_KEY) | (1ULL << RARCH_STATE_SLOT_PLUS) | (1ULL << RARCH_STATE_SLOT_MINUS) | (1ULL << RARCH_REWIND)
| (1ULL << RARCH_QUIT_KEY) | (1ULL << RARCH_RMENU_TOGGLE) | (1ULL << RARCH_RMENU_QUICKMENU_TOGGLE));

View File

@ -340,9 +340,9 @@ static void init_vtx(void)
GX_SetBlendMode(GX_BM_BLEND, GX_BL_ONE, GX_BL_INVSRCALPHA, 0);
g_tex.data = memalign(32, 4 * 4 * 2);
memset(g_tex.data, 0, 4 * 4 * 2);
DCFlushRange(g_tex.data, 4 * 4 * 2);
g_tex.data = memalign(32, 4 * 4 * 4);
memset(g_tex.data, 0, 4 * 4 * 4);
DCFlushRange(g_tex.data, 4 * 4 * 4);
init_texture(4, 4); // for menu texture
GX_Flush();
}
@ -431,7 +431,7 @@ static void *gx_init(const video_info_t *video,
{
RARCH_LOG("[GX] reallocate texture\n");
free(g_tex.data);
g_tex.data = memalign(32, RARCH_SCALE_BASE * RARCH_SCALE_BASE * video->input_scale * 2 * (video->rgb32 ? 4 : 2));
g_tex.data = memalign(32, RARCH_SCALE_BASE * RARCH_SCALE_BASE * video->input_scale * video->input_scale * (video->rgb32 ? 4 : 2));
if (!g_tex.data)
{