menu.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #include "../libpicofe/gp2x/plat_gp2x.h"
  2. // ------------ gfx options menu ------------
  3. const char *men_scaling_opts[] = { "OFF", "software", "hardware", NULL };
  4. #define MENU_OPTIONS_GFX \
  5. mee_enum ("Horizontal scaling", MA_OPT_SCALING, currentConfig.scaling, men_scaling_opts), \
  6. mee_enum ("Vertical scaling", MA_OPT_VSCALING, currentConfig.vscaling, men_scaling_opts), \
  7. mee_onoff ("Tearing Fix", MA_OPT_TEARING_FIX, currentConfig.EmuOpt, EOPT_WIZ_TEAR_FIX), \
  8. /*mee_onoff ("A_SN's gamma curve", MA_OPT2_A_SN_GAMMA, currentConfig.EmuOpt, EOPT_A_SN_GAMMA),*/ \
  9. mee_onoff ("Vsync", MA_OPT2_VSYNC, currentConfig.EmuOpt, EOPT_VSYNC),
  10. #define MENU_OPTIONS_ADV \
  11. mee_onoff ("Use second CPU for sound", MA_OPT_ARM940_SOUND, PicoIn.opt, POPT_EXT_FM), \
  12. static menu_entry e_menu_adv_options[];
  13. static menu_entry e_menu_gfx_options[];
  14. static menu_entry e_menu_options[];
  15. static menu_entry e_menu_keyconfig[];
  16. void gp2x_menu_init(void)
  17. {
  18. /* disable by default.. */
  19. me_enable(e_menu_adv_options, MA_OPT_ARM940_SOUND, 0);
  20. me_enable(e_menu_gfx_options, MA_OPT_TEARING_FIX, 0);
  21. me_enable(e_menu_gfx_options, MA_OPT2_GAMMA, 0);
  22. me_enable(e_menu_gfx_options, MA_OPT2_A_SN_GAMMA, 0);
  23. switch (gp2x_dev_id) {
  24. case GP2X_DEV_GP2X:
  25. me_enable(e_menu_adv_options, MA_OPT_ARM940_SOUND, 1);
  26. me_enable(e_menu_gfx_options, MA_OPT2_GAMMA, 1);
  27. me_enable(e_menu_gfx_options, MA_OPT2_A_SN_GAMMA, 1);
  28. break;
  29. case GP2X_DEV_WIZ:
  30. me_enable(e_menu_gfx_options, MA_OPT_TEARING_FIX, 1);
  31. break;
  32. case GP2X_DEV_CAANOO:
  33. break;
  34. default:
  35. break;
  36. }
  37. if (gp2x_dev_id != GP2X_DEV_GP2X)
  38. men_scaling_opts[2] = NULL; /* leave only off and sw */
  39. if (gp2x_dev_id != GP2X_DEV_CAANOO)
  40. me_enable(e_menu_keyconfig, MA_CTRL_DEADZONE, 0);
  41. }