X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=drivers%2Fcommon%2Fmenu.c;h=6a7f7955a191c6be34cc10632145eab7535b5769;hp=f2b99165bcf0fa48868fae3af93632f55f2fd90f;hb=03c1614fc3c6db44cfd03f62eb415492192a37a7;hpb=44343b8775fd8c9cfa1a2f865be369e09d1984ff diff --git a/drivers/common/menu.c b/drivers/common/menu.c index f2b9916..6a7f795 100644 --- a/drivers/common/menu.c +++ b/drivers/common/menu.c @@ -27,6 +27,7 @@ #include "../../general.h" #include "../../input.h" #include "../../palette.h" +#include "../../fce.h" #include "revision.h" #define array_size(x) (sizeof(x) / sizeof(x[0])) @@ -57,8 +58,9 @@ typedef enum MA_OPT_GG, MA_OPT_SHOWFPS, MA_OPT_FSKIP, - MA_OPT_SCALING, + MA_OPT_SWFILTER, MA_OPT_HWFILTER, + MA_OPT_SCALING, MA_OPT_RENDERER, MA_OPT_SOUNDON, MA_OPT_SOUNDRATE, @@ -428,6 +430,7 @@ static int menu_loop_fceu_options(int id, int keys) // -------------- options -------------- static const char *men_frameskip[] = { "Auto", "0", "1", "2", "3", "4", NULL }; +static const char *men_swfilter[] = { "none", "Scale2x", "Eagle2x", NULL }; static const char *men_scaling[] = { "1x", "proportional", "4:3 scaled", "fullscreen", NULL }; static const char *men_rates[] = { "8000", "11025", "16000", "22050", "44100", NULL }; static const int men_rates_i[] = { 8000 , 11025 , 16000 , 22050 , 44100 }; @@ -456,7 +459,8 @@ static menu_entry e_menu_options[] = { // mee_onoff ("Show FPS", MA_OPT_SHOWFPS, Settings.showfps, 1), mee_enum ("Frameskip", MA_OPT_FSKIP, frameskip_i, men_frameskip), - mee_enum ("HW filter", MA_OPT_HWFILTER, Settings.hw_filter, NULL), + mee_enum ("Softwere filter", MA_OPT_SWFILTER, Settings.sw_filter, men_swfilter), + mee_enum ("Hardware filter", MA_OPT_HWFILTER, Settings.hw_filter, NULL), mee_enum ("Scaling", MA_OPT_SCALING, Settings.scaling, men_scaling), mee_onoff_h ("Accurate renderer (slow)",MA_OPT_RENDERER, Settings.accurate_mode, 1, h_renderer), mee_onoff ("Enable sound", MA_OPT_SOUNDON, sndon, 1), @@ -504,15 +508,49 @@ static int menu_loop_options(int id, int keys) // -------------- root menu -------------- +static void draw_frame_main(void) +{ + struct tm *tmp; + time_t ltime; + int capacity = -1; + char ltime_s[16]; + char buff[128]; + char *out; + + if (!fceugi || !GameInterface) + return; + + buff[0] = 0; + GameInterface(GI_INFOSTRING, buff); + + smalltext_out16(4, 1, buff, 0xf7de); + + if (plat_target.get_bat_capacity) + capacity = plat_target.get_bat_capacity(); + ltime = time(NULL); + tmp = localtime(<ime); + strftime(ltime_s, sizeof(ltime_s), "%H:%M", tmp); + if (capacity >= 0) { + snprintf(buff, sizeof(buff), "%s %3d%%", ltime_s, capacity); + out = buff; + } + else + out = ltime_s; + smalltext_out16(4, 1 + me_sfont_h, out, 0xf7de); +} + static const char credits_text[] = "GPFCE " REV "\n" "(c) notaz, 2007,2012\n\n" - "Based on FCE Ultra versions\n" - "0.81 and 0.98.1x\n\n" + "Based on various FCE Ultra\n" + " / FCEUX versions\n\n" " - Credits -\n" "Bero: FCE\n" "Xodnizel: FCE Ultra\n" - "FCA author: 6502 core\n"; + "FCEUX team: FCEUX\n" + "CaH4e3: mappers\n" + "FCA author: 6502 core\n" + "M-HT: NEON scalers\n"; static void draw_frame_credits(void) { @@ -615,7 +653,7 @@ int menu_loop(void) in_set_config_int(0, IN_CFG_BLOCKING, 1); do { - me_loop_d(e_menu_main, &sel, NULL, NULL); + me_loop_d(e_menu_main, &sel, NULL, draw_frame_main); } while (!fceugi && menu_loop_ret == 0); /* wait until menu, ok, back is released */