#include <zlib/zlib.h>\r
\r
\r
+#define STATUS_MSG_TIMEOUT 2000\r
+\r
void *g_screen_ptr;\r
\r
#if !SCREEN_SIZE_FIXED\r
void emu_status_msg(const char *format, ...)\r
{\r
va_list vl;\r
+ int ret;\r
\r
va_start(vl, format);\r
- vsnprintf(noticeMsg, sizeof(noticeMsg), format, vl);\r
+ ret = vsnprintf(noticeMsg, sizeof(noticeMsg), format, vl);\r
va_end(vl);\r
\r
+ /* be sure old text gets overwritten */\r
+ for (; ret < 28; ret++)\r
+ noticeMsg[ret] = ' ';\r
+ noticeMsg[ret] = 0;\r
+\r
notice_msg_time = plat_get_ticks_ms();\r
}\r
\r
-static const char *biosfiles_us[] = { "us_scd1_9210", "us_scd2_9306", "SegaCDBIOS9303" };\r
-static const char *biosfiles_eu[] = { "eu_mcd1_9210", "eu_mcd2_9306", "eu_mcd2_9303" };\r
-static const char *biosfiles_jp[] = { "jp_mcd1_9112", "jp_mcd1_9111" };\r
+static const char * const biosfiles_us[] = { "us_scd1_9210", "us_scd2_9306", "SegaCDBIOS9303" };\r
+static const char * const biosfiles_eu[] = { "eu_mcd1_9210", "eu_mcd2_9306", "eu_mcd2_9303" };\r
+static const char * const biosfiles_jp[] = { "jp_mcd1_9112", "jp_mcd1_9111" };\r
\r
static int find_bios(int region, char **bios_file)\r
{\r
static char bios_path[1024];\r
int i, count;\r
- const char **files;\r
+ const char * const *files;\r
FILE *f = NULL;\r
\r
if (region == 4) { // US\r
}\r
else ret = -1;\r
if (!ret)\r
- emu_status_msg(load ? "GAME LOADED" : "GAME SAVED");\r
+ emu_status_msg(load ? "STATE LOADED" : "STATE SAVED");\r
else\r
{\r
emu_status_msg(load ? "LOAD FAILED" : "SAVE FAILED");\r
in_set_blocking(0);\r
}\r
if (do_it) {\r
- plat_status_msg_busy_first((which & PEV_STATE_LOAD) ? "LOADING GAME" : "SAVING GAME");\r
+ plat_status_msg_busy_first((which & PEV_STATE_LOAD) ? "LOADING STATE" : "SAVING STATE");\r
PicoStateProgressCB = plat_status_msg_busy_next;\r
emu_save_load_game((which & PEV_STATE_LOAD) ? 1 : 0, 0);\r
PicoStateProgressCB = NULL;\r
if (notice_msg_time != 0)\r
{\r
static int noticeMsgSum;\r
- if (timestamp - ms_to_ticks(notice_msg_time) > ms_to_ticks(2000)) {\r
+ if (timestamp - ms_to_ticks(notice_msg_time) > ms_to_ticks(STATUS_MSG_TIMEOUT)) {\r
notice_msg_time = 0;\r
plat_status_msg_clear();\r
notice_msg = NULL;\r
else {\r
pframes_done -= target_fps;\r
/* don't allow it to drift during heavy slowdowns */\r
+ if (pframes_done < -5) {\r
+ reset_timing = 1;\r
+ continue;\r
+ }\r
if (pframes_done < -2)\r
pframes_done = -2;\r
}\r
else if (diff > diff_lim)\r
{\r
/* no time left for this frame - skip */\r
- if (diff - diff_lim >= ms_to_ticks(300)) {\r
+ if (diff - diff_lim >= ms_to_ticks(200)) {\r
/* if too much behind, reset instead */\r
reset_timing = 1;\r
continue;\r
\r
if (!is_wiz) {\r
me_enable(e_menu_gfx_options, MA_OPT_TEARING_FIX, 0);\r
+ i = me_id2offset(e_menu_gfx_options, MA_OPT_TEARING_FIX);\r
+ e_menu_gfx_options[i].need_to_save = 0;\r
return;\r
}\r
\r
\r
i = me_id2offset(e_menu_gfx_options, MA_OPT_SCALING);\r
e_menu_gfx_options[i].max = 1; /* only off and sw */\r
+ i = me_id2offset(e_menu_gfx_options, MA_OPT_ARM940_SOUND);\r
+ e_menu_gfx_options[i].need_to_save = 0;\r
}\r
\r
/* TODO: rename */\r