static void osd_text(int x, int y, const char *text) { int len = strlen(text) * 8 / 2; int *p, h; for (h = 0; h < 8; h++) { p = (int *) ((unsigned short *) giz_screen+x+321*(y+h)); p = (int *) ((int)p & ~3); // align memset32(p, 0, len); } emu_text_out16(x, y, text); }
static void osd_text(int x, const char *text, int is_active, int clear_all) { unsigned short *screen = is_active ? psp_video_get_active_fb() : psp_screen; int len = clear_all ? (480 / 2) : (strlen(text) * 8 / 2); int *p, h; void *tmp; for (h = 0; h < 8; h++) { p = (int *) (screen+x+512*(264+h)); p = (int *) ((int)p & ~3); // align memset32_uncached(p, 0, len); } if (is_active) { tmp = psp_screen; psp_screen = screen; } // nasty pointer tricks emu_text_out16(x, 264, text); if (is_active) psp_screen = tmp; }
static void emu_msg_cb(const char *msg) { if (giz_screen != NULL) fb_unlock(); giz_screen = fb_lock(1); memset32((int *)((char *)giz_screen + 321*232*2), 0, 321*8*2/4); emu_text_out16(4, 232, msg); noticeMsgTime = GetTickCount() - 2000; /* assumption: emu_msg_cb gets called only when something slow is about to happen */ reset_timing = 1; fb_unlock(); giz_screen = fb_lock((currentConfig.EmuOpt&0x8000) ? 0 : 1); }