diff options
-rw-r--r-- | frontend/main.c | 1 | ||||
-rw-r--r-- | frontend/menu.c | 2 | ||||
-rw-r--r-- | frontend/menu.h | 1 | ||||
-rw-r--r-- | frontend/plat_trimui.c | 56 |
4 files changed, 31 insertions, 29 deletions
diff --git a/frontend/main.c b/frontend/main.c index e2b00d6..c1f1cc4 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -633,6 +633,7 @@ int main(int argc, char *argv[]) SysPrintf(_("Could not load CD-ROM!\n")); return -1; } + menu_load_config(1); emu_on_new_cd(!loadst); ready_to_go = 1; } diff --git a/frontend/menu.c b/frontend/menu.c index 2196258..fc95294 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -595,7 +595,7 @@ static void parse_str_val(char *cval, const char *src) static void keys_load_all(const char *cfg); -static int menu_load_config(int is_game) +int menu_load_config(int is_game) { char cfgfile[MAXPATHLEN]; int i, ret = -1; diff --git a/frontend/menu.h b/frontend/menu.h index 8f5acda..db9b665 100644 --- a/frontend/menu.h +++ b/frontend/menu.h @@ -2,6 +2,7 @@ #define __MENU_H__ void menu_init(void); +int menu_load_config(int is_game); void menu_prepare_emu(void); void menu_loop(void); void menu_finish(void); diff --git a/frontend/plat_trimui.c b/frontend/plat_trimui.c index 907a03a..6b1038a 100644 --- a/frontend/plat_trimui.c +++ b/frontend/plat_trimui.c @@ -176,34 +176,34 @@ void plat_minimize(void) { } -#define make_flip_func(name, scale, blitfunc) \ -static void name(int doffs, const void *vram_, int w, int h, int sstride, int bgr24) \ -{ \ - const unsigned short *vram = vram_; \ - unsigned char *conv = (unsigned char *)cspace_buf; \ - unsigned char *dst = (unsigned char *)screen->pixels + \ - (fb_offset_y * 320 + fb_offset_x) * sizeof(uint16_t); \ - int dst_stride = 640; \ - int len = psx_src_width * psx_bpp / 8; \ - int i; \ - void (*convertfunc)(void *dst, const void *src, int bytes); \ - convertfunc = psx_bpp == 24 ? bgr888_to_rgb565 : bgr555_to_rgb565; \ - \ - SDL_LockSurface(screen); \ - vram += psx_offset_y * 1024 + psx_offset_x; \ - for (i = psx_src_height; i > 0; i--, \ - vram += psx_step * 1024, \ - dst += dst_stride, \ - conv += dst_stride) { \ - if (scale) { \ - convertfunc(conv, vram, len); \ - blitfunc(dst, conv, dst_stride); \ - } else { \ - convertfunc(dst, vram, len); \ - } \ - } \ - SDL_UnlockSurface(screen); \ -} +#define make_flip_func(name, scale, blitfunc) \ + static void name(int doffs, const void *vram_, int w, int h, int sstride, int bgr24) \ + { \ + const unsigned short *vram = vram_; \ + unsigned char *conv = (unsigned char *)cspace_buf; \ + unsigned char *dst = (unsigned char *)screen->pixels + \ + (fb_offset_y * 320 + fb_offset_x) * sizeof(uint16_t); \ + int dst_stride = 640; \ + int len = psx_src_width * psx_bpp / 8; \ + int i; \ + void (*convertfunc)(void *dst, const void *src, int bytes); \ + convertfunc = psx_bpp == 24 ? bgr888_to_rgb565 : bgr555_to_rgb565; \ + \ + SDL_LockSurface(screen); \ + vram += psx_offset_y * 1024 + psx_offset_x; \ + for (i = psx_src_height; i > 0; i--, \ + vram += psx_step * 1024, \ + dst += dst_stride, \ + conv += dst_stride) { \ + if (scale) { \ + convertfunc(conv, vram, len); \ + blitfunc(dst, conv, dst_stride); \ + } else { \ + convertfunc(dst, vram, len); \ + } \ + } \ + SDL_UnlockSurface(screen); \ + } make_flip_func(raw_blit_soft, false, memcpy) make_flip_func(raw_blit_soft_368, true, blit320_368) |