mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
ui, fix sdl flickering and status lines artifact issues
This commit is contained in:
parent
3618d636d2
commit
758abbebc2
7 changed files with 81 additions and 70 deletions
|
@ -168,6 +168,7 @@ static void load_progress_cb(int percent)
|
|||
len = g_menuscreen_w;
|
||||
|
||||
menu_draw_begin(0, 1);
|
||||
memcpy(g_menuscreen_ptr, g_menubg_ptr, g_menuscreen_w * g_menuscreen_h * 2);
|
||||
dst = (unsigned short *)g_menuscreen_ptr + g_menuscreen_pp * me_sfont_h * 2;
|
||||
for (ln = me_sfont_h - 2; ln > 0; ln--, dst += g_menuscreen_pp)
|
||||
memset(dst, 0xff, len * 2);
|
||||
|
@ -182,6 +183,7 @@ static void cdload_progress_cb(const char *fname, int percent)
|
|||
menu_draw_begin(0, 1);
|
||||
dst = (unsigned short *)g_menuscreen_ptr + g_menuscreen_pp * me_sfont_h * 2;
|
||||
|
||||
memcpy(g_menuscreen_ptr, g_menubg_ptr, g_menuscreen_w * g_menuscreen_h * 2);
|
||||
menuscreen_memset_lines(dst, 0xff, me_sfont_h - 2);
|
||||
|
||||
smalltext_out16(1, 3 * me_sfont_h, "Processing CD image / MP3s", 0xffff);
|
||||
|
@ -201,18 +203,16 @@ static void cdload_progress_cb(const char *fname, int percent)
|
|||
void menu_romload_prepare(const char *rom_name)
|
||||
{
|
||||
const char *p = rom_name + strlen(rom_name);
|
||||
int i;
|
||||
|
||||
while (p > rom_name && *p != '/')
|
||||
p--;
|
||||
|
||||
/* fill all buffers, callbacks won't update in full */
|
||||
for (i = 0; i < 3; i++) {
|
||||
menu_draw_begin(1, 1);
|
||||
smalltext_out16(1, 1, "Loading", 0xffff);
|
||||
smalltext_out16(1, me_sfont_h, p, 0xffff);
|
||||
menu_draw_end();
|
||||
}
|
||||
menu_draw_begin(1, 1);
|
||||
smalltext_out16(1, 1, "Loading", 0xffff);
|
||||
smalltext_out16(1, me_sfont_h, p, 0xffff);
|
||||
/* background screen for callbacks */
|
||||
memcpy(g_menubg_ptr, g_menuscreen_ptr, g_menuscreen_w * g_menuscreen_h * 2);
|
||||
menu_draw_end();
|
||||
|
||||
PicoCartLoadProgressCB = load_progress_cb;
|
||||
PicoCDLoadProgressCB = cdload_progress_cb;
|
||||
|
@ -225,6 +225,7 @@ void menu_romload_end(void)
|
|||
PicoCDLoadProgressCB = NULL;
|
||||
|
||||
menu_draw_begin(0, 1);
|
||||
memcpy(g_menuscreen_ptr, g_menubg_ptr, g_menuscreen_w * g_menuscreen_h * 2);
|
||||
smalltext_out16(1, (cdload_called ? 6 : 3) * me_sfont_h,
|
||||
"Starting emulation...", 0xffff);
|
||||
menu_draw_end();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue