mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-16 23:37:11 +00:00
(PS3) Implemented menu code some more
This commit is contained in:
parent
13a2010ed6
commit
a4a68a2ad5
4
driver.h
4
driver.h
@ -54,9 +54,13 @@ enum
|
||||
SSNES_CHEAT_INDEX_PLUS,
|
||||
SSNES_CHEAT_INDEX_MINUS,
|
||||
SSNES_CHEAT_TOGGLE,
|
||||
SSNES_CHEAT_INPUT,
|
||||
SSNES_SCREENSHOT,
|
||||
SSNES_DSP_CONFIG,
|
||||
SSNES_MUTE,
|
||||
SSNES_INGAME_MENU,
|
||||
SSNES_EXIT_TO_MENU,
|
||||
SSNES_SRAM_WRITE_PROTECT,
|
||||
|
||||
SSNES_BIND_LIST_END
|
||||
};
|
||||
|
@ -58,6 +58,9 @@ bool g_rom_loaded;
|
||||
bool return_to_MM; /* launch multiMAN on exit if ROM is passed*/
|
||||
uint32_t g_screenshots_enabled;
|
||||
|
||||
char special_action_msg[256]; /* message which should be overlaid on top of the screen*/
|
||||
uint32_t special_action_msg_expired; /* time at which the message no longer needs to be overlaid onscreen*/
|
||||
|
||||
char contentInfoPath[MAX_PATH_LENGTH];
|
||||
char usrDirPath[MAX_PATH_LENGTH];
|
||||
char DEFAULT_PRESET_FILE[MAX_PATH_LENGTH];
|
||||
@ -79,6 +82,12 @@ SYS_PROCESS_PARAM(1001, 0x100000)
|
||||
|
||||
#undef main
|
||||
|
||||
void set_text_message(const char * message, uint32_t speed)
|
||||
{
|
||||
snprintf(special_action_msg, sizeof(special_action_msg), message);
|
||||
//special_action_msg_expired = ps3graphics_set_text_message_speed(speed);
|
||||
}
|
||||
|
||||
static bool file_exists(const char * filename)
|
||||
{
|
||||
CellFsStat sb;
|
||||
|
@ -595,7 +595,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_UP
|
||||
SNES_DEVICE_ID_JOYPAD_UP
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_DPAD_DOWN,
|
||||
@ -612,7 +612,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_DOWN
|
||||
SNES_DEVICE_ID_JOYPAD_DOWN
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_DPAD_LEFT,
|
||||
@ -629,7 +629,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_LEFT
|
||||
SNES_DEVICE_ID_JOYPAD_LEFT
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_DPAD_RIGHT,
|
||||
@ -646,7 +646,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_RIGHT
|
||||
SNES_DEVICE_ID_JOYPAD_RIGHT
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_CIRCLE,
|
||||
@ -663,7 +663,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_A
|
||||
SNES_DEVICE_ID_JOYPAD_A
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_CROSS,
|
||||
@ -680,7 +680,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_B
|
||||
SNES_DEVICE_ID_JOYPAD_B
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_TRIANGLE,
|
||||
@ -697,7 +697,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_X
|
||||
SNES_DEVICE_ID_JOYPAD_X
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_SQUARE,
|
||||
@ -714,7 +714,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_Y
|
||||
SNES_DEVICE_ID_JOYPAD_Y
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_SELECT,
|
||||
@ -731,7 +731,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_SELECT
|
||||
SNES_DEVICE_ID_JOYPAD_SELECT
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_START,
|
||||
@ -748,7 +748,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_START
|
||||
SNES_DEVICE_ID_JOYPAD_START
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_L1,
|
||||
@ -765,7 +765,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_L
|
||||
SNES_DEVICE_ID_JOYPAD_L
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_R1,
|
||||
@ -782,7 +782,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_R
|
||||
SNES_DEVICE_ID_JOYPAD_R
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_L2,
|
||||
@ -799,7 +799,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_NONE
|
||||
0
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_R2,
|
||||
@ -816,7 +816,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_NONE
|
||||
0
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_L3,
|
||||
@ -833,7 +833,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_NONE
|
||||
0
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_R3,
|
||||
@ -850,7 +850,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_INGAME_MENU
|
||||
SSNES_INGAME_MENU
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_L2_BUTTON_L3,
|
||||
@ -867,7 +867,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_NONE
|
||||
0
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_L2_BUTTON_R3,
|
||||
@ -884,7 +884,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_NONE
|
||||
0
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_L2_ANALOG_R_RIGHT,
|
||||
@ -902,9 +902,9 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
{0},
|
||||
{0},
|
||||
#ifdef HAVE_CHEATS
|
||||
BTN_INCREMENTCHEAT
|
||||
SSNES_CHEAT_INDEX_PLUS
|
||||
#else
|
||||
BTN_NONE
|
||||
0
|
||||
#endif
|
||||
},
|
||||
{
|
||||
@ -923,9 +923,9 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
{0},
|
||||
{0},
|
||||
#ifdef HAVE_CHEATS
|
||||
BTN_DECREMENTCHEAT
|
||||
SSNES_CHEAT_INDEX_MINUS
|
||||
#else
|
||||
BTN_NONE
|
||||
0
|
||||
#endif
|
||||
},
|
||||
{
|
||||
@ -944,9 +944,9 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
{0},
|
||||
{0},
|
||||
#ifdef HAVE_CHEATS
|
||||
BTN_CHEATTOGGLE
|
||||
SSNES_CHEAT_TOGGLE
|
||||
#else
|
||||
BTN_NONE
|
||||
0
|
||||
#endif
|
||||
},
|
||||
{
|
||||
@ -965,9 +965,9 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
{0},
|
||||
{0},
|
||||
#ifdef HAVE_CHEATS
|
||||
BTN_CHEATINPUT
|
||||
SSNES_CHEAT_INPUT
|
||||
#else
|
||||
BTN_NONE
|
||||
0
|
||||
#endif
|
||||
},
|
||||
{
|
||||
@ -985,7 +985,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_INCREMENTSAVE
|
||||
SSNES_STATE_SLOT_PLUS
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_R2_ANALOG_R_LEFT,
|
||||
@ -1002,7 +1002,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_DECREMENTSAVE
|
||||
SSNES_STATE_SLOT_MINUS
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_R2_ANALOG_R_UP,
|
||||
@ -1019,7 +1019,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_QUICKLOAD
|
||||
SSNES_LOAD_STATE_KEY
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_R2_ANALOG_R_DOWN,
|
||||
@ -1036,7 +1036,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_QUICKSAVE
|
||||
SSNES_SAVE_STATE_KEY
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_R2_BUTTON_R3,
|
||||
@ -1053,7 +1053,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_SRAM_WRITEPROTECT
|
||||
SSNES_SRAM_WRITE_PROTECT
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_BUTTON_R3_BUTTON_L3,
|
||||
@ -1070,7 +1070,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_EXITTOMENU
|
||||
SSNES_EXIT_TO_MENU
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_ANALOG_R_UP,
|
||||
@ -1087,7 +1087,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_NONE
|
||||
0
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_ANALOG_R_DOWN,
|
||||
@ -1104,7 +1104,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_FASTFORWARD
|
||||
SSNES_FAST_FORWARD_KEY
|
||||
},
|
||||
{
|
||||
SETTING_CONTROLS_ANALOG_R_LEFT,
|
||||
@ -1121,7 +1121,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_NONE,
|
||||
0,
|
||||
1
|
||||
},
|
||||
{
|
||||
@ -1139,7 +1139,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
NULL, //setting ptr
|
||||
{0},
|
||||
{0},
|
||||
BTN_NONE,
|
||||
0,
|
||||
1
|
||||
},
|
||||
{
|
||||
|
128
ps3/menu.c
128
ps3/menu.c
@ -22,6 +22,7 @@
|
||||
//#include "cellframework2/input/pad_input.h"
|
||||
#include "cellframework2/fileio/file_browser.h"
|
||||
|
||||
#include "shared.h"
|
||||
#include "../general.h"
|
||||
|
||||
#include "menu.h"
|
||||
@ -144,11 +145,7 @@ static void display_menubar(uint32_t menu_enum)
|
||||
cellDbgFontDraw();
|
||||
}
|
||||
|
||||
#define FILEBROWSER_DELAY 100000
|
||||
#define FILEBROWSER_DELAY_DIVIDED_BY_3 33333
|
||||
#define SETTINGS_DELAY 150000
|
||||
.
|
||||
#define ROM_EXTENSIONS "fds|FDS|zip|ZIP|nes|NES|unif|UNIF"
|
||||
#define ROM_EXTENSIONS "fds|FDS|zip|ZIP|nes|NES|unif|UNIF|smc|fig|sfc|gd3|gd7|dx2|bsx|swc|SMC|FIG|SFC|BSX|GD3|GD7|DX2|SWC"
|
||||
|
||||
static void UpdateBrowser(filebrowser_t * b)
|
||||
{
|
||||
@ -259,7 +256,6 @@ static void UpdateBrowser(filebrowser_t * b)
|
||||
if (g_rom_loaded)
|
||||
{
|
||||
menu_is_running = 0;
|
||||
Emulator_StartROMRunning(1);
|
||||
set_text_message("", 15);
|
||||
}
|
||||
}
|
||||
@ -373,25 +369,18 @@ static void do_select_file(uint32_t menu_id)
|
||||
switch(menu_id)
|
||||
{
|
||||
case GAME_AWARE_SHADER_CHOICE:
|
||||
/*emulator_implementation_set_gameaware(path);*/
|
||||
strncpy(Settings.GameAwareShaderPath, path, sizeof(Settings.GameAwareShaderPath));
|
||||
break;
|
||||
case SHADER_CHOICE:
|
||||
if(set_shader)
|
||||
strncpy(g_settings.video.second_pass_shader, path, sizeof(g_settings.video.second_pass_shader));
|
||||
else
|
||||
strncpy(g_settings.video.cg_shader_path, path, sizeof(g_settings.video.cg_shader_path));
|
||||
ps3graphics_load_fragment_shader(path, set_shader);
|
||||
break;
|
||||
case PRESET_CHOICE:
|
||||
emulator_implementation_set_shader_preset(path);
|
||||
break;
|
||||
case INPUT_PRESET_CHOICE:
|
||||
emulator_set_controls(path, READ_CONTROLS, "");
|
||||
break;
|
||||
case BORDER_CHOICE:
|
||||
strncpy(Settings.PS3CurrentBorder, path, sizeof(Settings.PS3CurrentBorder));
|
||||
emulator_implementation_set_texture(path);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -441,19 +430,13 @@ static void do_pathChoice(uint32_t menu_id)
|
||||
switch(menu_id)
|
||||
{
|
||||
case PATH_SAVESTATES_DIR_CHOICE:
|
||||
strcpy(Settings.PS3PathSaveStates, path);
|
||||
break;
|
||||
case PATH_SRAM_DIR_CHOICE:
|
||||
strcpy(Settings.PS3PathSRAM, path);
|
||||
break;
|
||||
case PATH_CHEATS_DIR_CHOICE:
|
||||
strcpy(Settings.PS3PathCheats, path);
|
||||
break;
|
||||
case PATH_BASE_DIR_CHOICE:
|
||||
strcpy(Settings.PS3PathBaseDirectory, path);
|
||||
strcpy(g_settings.cheat_database, path);
|
||||
break;
|
||||
case PATH_DEFAULT_ROM_DIR_CHOICE:
|
||||
strcpy(Settings.PS3PathROMDirectory, path);
|
||||
break;
|
||||
}
|
||||
menuStackindex--;
|
||||
@ -466,19 +449,13 @@ static void do_pathChoice(uint32_t menu_id)
|
||||
switch(menu_id)
|
||||
{
|
||||
case PATH_SAVESTATES_DIR_CHOICE:
|
||||
strcpy(Settings.PS3PathSaveStates, path);
|
||||
break;
|
||||
case PATH_SRAM_DIR_CHOICE:
|
||||
strcpy(Settings.PS3PathSRAM, path);
|
||||
break;
|
||||
case PATH_CHEATS_DIR_CHOICE:
|
||||
strcpy(Settings.PS3PathCheats, path);
|
||||
break;
|
||||
case PATH_BASE_DIR_CHOICE:
|
||||
strcpy(Settings.PS3PathBaseDirectory, path);
|
||||
strcpy(g_settings.cheat_database, path);
|
||||
break;
|
||||
case PATH_DEFAULT_ROM_DIR_CHOICE:
|
||||
strcpy(Settings.PS3PathROMDirectory, path);
|
||||
break;
|
||||
}
|
||||
menuStackindex--;
|
||||
@ -534,14 +511,12 @@ static void display_help_text(int currentsetting)
|
||||
print_help_message_yesno(menu_generalvideosettings, currentsetting);
|
||||
break;
|
||||
case SETTING_SCALE_FACTOR:
|
||||
snprintf(menu_generalvideosettings.items[currentsetting].comment, sizeof(menu_generalvideosettings.items[currentsetting].comment), "INFO - [Custom Scaling Factor] is set to: '%dx'.", Settings.ScaleFactor);
|
||||
snprintf(menu_generalvideosettings.items[currentsetting].comment, sizeof(menu_generalvideosettings.items[currentsetting].comment), "INFO - [Custom Scaling Factor] is set to: %dx (X), %dx (Y).", g_settings.video.fbo_scale_x, g_settings.video.fbo_scale_y);
|
||||
print_help_message(menu_generalvideosettings, currentsetting);
|
||||
break;
|
||||
case SETTING_KEEP_ASPECT_RATIO:
|
||||
cellDbgFontPrintf(0.09f, 0.83f, 0.91f, LIGHTBLUE, "INFO - [Aspect ratio] is set to '%d:%d'.", ps3graphics_get_aspect_ratio_int(0), ps3graphics_get_aspect_ratio_int(1));
|
||||
break;
|
||||
case SETTING_SOUND_MODE:
|
||||
snprintf(menu_generalaudiosettings.items[currentsetting].comment, sizeof(menu_generalaudiosettings.items[currentsetting].comment), Settings.SoundMode == SOUND_MODE_RSOUND ? "INFO - [Sound Output] is set to 'RSound' - the sound will be streamed over the\n network to the RSound audio server." : Settings.SoundMode == SOUND_MODE_HEADSET ? "INFO - [Sound Output] is set to 'USB/Bluetooth Headset' - sound will\n be output through the headset" : "INFO - [Sound Output] is set to 'Normal' - normal audio output will be\nused.");
|
||||
print_help_message(menu_generalaudiosettings, currentsetting);
|
||||
break;
|
||||
case SETTING_BORDER:
|
||||
@ -560,8 +535,6 @@ static void display_help_text(int currentsetting)
|
||||
print_help_message(menu_generalaudiosettings, currentsetting);
|
||||
break;
|
||||
case SETTING_CONTROLS_SCHEME:
|
||||
cellDbgFontPrintf(0.09f, 0.83f, 0.86f, LIGHTBLUE,
|
||||
Settings.ControlScheme == CONTROL_SCHEME_DEFAULT ? "INFO - Control scheme [Default] is selected.\nNOTE: You can't customize the controls with this scheme." : "INFO - Control scheme [Custom] is selected.\nNOTE: You can customize the controls with this scheme.");
|
||||
break;
|
||||
case SETTING_CONTROLS_DPAD_UP:
|
||||
case SETTING_CONTROLS_DPAD_DOWN:
|
||||
@ -624,50 +597,6 @@ static void display_help_text(int currentsetting)
|
||||
cellDbgFontPrintf(0.09f, 0.83f, 0.86f, LIGHTBLUE, "%s", Settings.PS3PALTemporalMode60Hz ? "INFO - PAL 60Hz mode is enabled - 60Hz NTSC games will run correctly at 576p PAL\nresolution. NOTE: This is configured on-the-fly." : "INFO - PAL 60Hz mode disabled - 50Hz PAL games will run correctly at 576p PAL\nresolution. NOTE: This is configured on-the-fly.");
|
||||
break;
|
||||
*/
|
||||
case SETTING_CONTROLS_SCHEME:
|
||||
cellDbgFontPrintf(0.09f, 0.83f, 0.86f, LIGHTBLUE, "INFO - Input Control scheme preset [%s] is selected.\n", Settings.PS3CurrentInputPresetTitle);
|
||||
break;
|
||||
case SETTING_CONTROLS_DPAD_UP:
|
||||
case SETTING_CONTROLS_DPAD_DOWN:
|
||||
case SETTING_CONTROLS_DPAD_LEFT:
|
||||
case SETTING_CONTROLS_DPAD_RIGHT:
|
||||
case SETTING_CONTROLS_BUTTON_CIRCLE:
|
||||
case SETTING_CONTROLS_BUTTON_CROSS:
|
||||
case SETTING_CONTROLS_BUTTON_TRIANGLE:
|
||||
case SETTING_CONTROLS_BUTTON_SQUARE:
|
||||
case SETTING_CONTROLS_BUTTON_SELECT:
|
||||
case SETTING_CONTROLS_BUTTON_START:
|
||||
case SETTING_CONTROLS_BUTTON_L1:
|
||||
case SETTING_CONTROLS_BUTTON_R1:
|
||||
case SETTING_CONTROLS_BUTTON_L2:
|
||||
case SETTING_CONTROLS_BUTTON_R2:
|
||||
case SETTING_CONTROLS_BUTTON_L3:
|
||||
case SETTING_CONTROLS_BUTTON_R3:
|
||||
case SETTING_CONTROLS_BUTTON_L2_BUTTON_L3:
|
||||
case SETTING_CONTROLS_BUTTON_L2_BUTTON_R3:
|
||||
case SETTING_CONTROLS_BUTTON_L2_ANALOG_R_RIGHT:
|
||||
case SETTING_CONTROLS_BUTTON_L2_ANALOG_R_LEFT:
|
||||
case SETTING_CONTROLS_BUTTON_L2_ANALOG_R_UP:
|
||||
case SETTING_CONTROLS_BUTTON_L2_ANALOG_R_DOWN:
|
||||
case SETTING_CONTROLS_BUTTON_R2_ANALOG_R_RIGHT:
|
||||
case SETTING_CONTROLS_BUTTON_R2_ANALOG_R_LEFT:
|
||||
case SETTING_CONTROLS_BUTTON_R2_ANALOG_R_UP:
|
||||
case SETTING_CONTROLS_BUTTON_R2_ANALOG_R_DOWN:
|
||||
case SETTING_CONTROLS_BUTTON_R2_BUTTON_R3:
|
||||
case SETTING_CONTROLS_BUTTON_R3_BUTTON_L3:
|
||||
case SETTING_CONTROLS_ANALOG_R_UP:
|
||||
case SETTING_CONTROLS_ANALOG_R_DOWN:
|
||||
case SETTING_CONTROLS_ANALOG_R_LEFT:
|
||||
case SETTING_CONTROLS_ANALOG_R_RIGHT:
|
||||
cellDbgFontPrintf(0.09f, 0.83f, 0.86f, LIGHTBLUE, "INFO - [%s] on the PS3 controller is mapped to action:\n[%s].", menu_controlssettings.items[currentsetting].text, Input_PrintMappedButton(control_binds[currently_selected_controller_menu][currentsetting-FIRST_CONTROL_BIND]));
|
||||
break;
|
||||
case SETTING_CONTROLS_SAVE_CUSTOM_CONTROLS:
|
||||
cellDbgFontPuts(0.09f, 0.83f, 0.86f, LIGHTBLUE, "INFO - Save the custom control settings.\nNOTE: This option will not do anything with Control Scheme [New] or [Default].");
|
||||
break;
|
||||
case SETTING_CONTROLS_DEFAULT_ALL:
|
||||
cellDbgFontPuts(0.09f, 0.83f, 0.86f, LIGHTBLUE, "INFO - Set all 'Controls' settings back to their default values.");
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -677,7 +606,7 @@ static void display_label_value(uint64_t switchvalue)
|
||||
{
|
||||
case SETTING_CHANGE_RESOLUTION:
|
||||
{
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[switchvalue].text_ypos, FONT_SIZE, ps3graphics_get_initial_resolution() == ps3graphics_get_current_resolution() ? GREEN : ORANGE, ps3graphics_get_resolution_label(ps3graphics_get_current_resolution()));
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[switchvalue].text_ypos, FONT_SIZE, GREEN, "Unimplemented");
|
||||
cellDbgFontDraw();
|
||||
break;
|
||||
}
|
||||
@ -693,77 +622,66 @@ static void display_label_value(uint64_t switchvalue)
|
||||
break;
|
||||
#endif
|
||||
case SETTING_SHADER_PRESETS:
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].text_ypos, FONT_SIZE,
|
||||
(menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].enabled == 0) ? SILVER : strcmp(Settings.ShaderPresetPath, DEFAULT_PRESET_FILE) == 0 ? GREEN : ORANGE,
|
||||
"%s", Settings.ShaderPresetTitle);
|
||||
break;
|
||||
case SETTING_BORDER:
|
||||
{
|
||||
extract_filename_only(Settings.PS3CurrentBorder);
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].text_ypos, FONT_SIZE, GREEN, "%s", fname_without_path_extension);
|
||||
}
|
||||
break;
|
||||
case SETTING_SHADER:
|
||||
{
|
||||
#if 0
|
||||
extract_filename_only(g_settings.video.cg_shader_path);
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].text_ypos, FONT_SIZE, GREEN, "%s", fname_without_path_extension);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case SETTING_SHADER_2:
|
||||
{
|
||||
extract_filename_only(g_settings.second_pass_shader);
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[switchvalue].text_ypos, FONT_SIZE, !(Settings.ScaleEnabled) ? SILVER : GREEN, "%s", fname_without_path_extension);
|
||||
#if 0
|
||||
extract_filename_only(g_settings.video.second_pass_shader);
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[switchvalue].text_ypos, FONT_SIZE, !(g_settings.video.render_to_texture) ? SILVER : GREEN, "%s", fname_without_path_extension);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case SETTING_FONT_SIZE:
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[switchvalue].text_ypos, FONT_SIZE, Settings.PS3FontSize == 100 ? GREEN : ORANGE, "%f", FONT_SIZE);
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[switchvalue].text_ypos, FONT_SIZE, GREEN, "%f", FONT_SIZE);
|
||||
break;
|
||||
case SETTING_KEEP_ASPECT_RATIO:
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[switchvalue].text_ypos, 0.91f, ps3graphics_get_aspect_ratio_float(Settings.PS3KeepAspect) == SCREEN_4_3_ASPECT_RATIO ? GREEN : ORANGE, "%s%d:%d", ps3graphics_calculate_aspect_ratio_before_game_load() ? "(Auto)" : "", (int)ps3graphics_get_aspect_ratio_int(0), (int)ps3graphics_get_aspect_ratio_int(1));
|
||||
cellDbgFontDraw();
|
||||
break;
|
||||
case SETTING_HW_TEXTURE_FILTER:
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[switchvalue].text_ypos, FONT_SIZE, Settings.PS3Smooth ? GREEN : ORANGE, Settings.PS3Smooth ? "Linear interpolation" : "Point filtering");
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[switchvalue].text_ypos, FONT_SIZE, g_settings.video.smooth ? GREEN : ORANGE, g_settings.video.smooth ? "Linear interpolation" : "Point filtering");
|
||||
break;
|
||||
case SETTING_HW_TEXTURE_FILTER_2:
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[switchvalue].text_ypos, FONT_SIZE, !(menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].enabled) ? SILVER : Settings.PS3Smooth2 ? GREEN : ORANGE, Settings.PS3Smooth2 ? "Linear interpolation" : "Point filtering");
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[switchvalue].text_ypos, FONT_SIZE, !(menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].enabled) ? SILVER : g_settings.video.second_pass_smooth ? GREEN : ORANGE, g_settings.video.second_pass_smooth ? "Linear interpolation" : "Point filtering");
|
||||
break;
|
||||
case SETTING_SCALE_FACTOR:
|
||||
cellDbgFontPrintf (0.5f, menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].text_ypos, FONT_SIZE, (menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].enabled == 0) ? SILVER : Settings.ScaleFactor == 2 ? GREEN : ORANGE, "%dx", Settings.ScaleFactor);
|
||||
cellDbgFontPrintf(0.5f, menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].text_ypos, FONT_SIZE, (menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].enabled == 0) ? SILVER : g_settings.video.fbo_scale_x == 2 && g_settings.video.fbo_scale_y ? GREEN : ORANGE, "%dx (X), %dx (Y)", g_settings.video.fbo_scale_x, g_settings.video.fbo_scale_y);
|
||||
break;
|
||||
case SETTING_HW_OVERSCAN_AMOUNT:
|
||||
cellDbgFontPrintf (0.5f, menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].text_ypos, FONT_SIZE, Settings.PS3OverscanAmount == 0 ? GREEN : ORANGE, "%f", (float)Settings.PS3OverscanAmount/100);
|
||||
//cellDbgFontPrintf (0.5f, menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].text_ypos, FONT_SIZE, Settings.PS3OverscanAmount == 0 ? GREEN : ORANGE, "%f", (float)Settings.PS3OverscanAmount/100);
|
||||
break;
|
||||
case SETTING_SOUND_MODE:
|
||||
cellDbgFontPuts(0.5f, menu_generalaudiosettings.items[menu_generalaudiosettings.items[switchvalue].enum_id].text_ypos, FONT_SIZE, Settings.SoundMode == SOUND_MODE_NORMAL ? GREEN : ORANGE, Settings.SoundMode == SOUND_MODE_RSOUND ? "RSound" : Settings.SoundMode == SOUND_MODE_HEADSET ? "USB/Bluetooth Headset" : "Normal");
|
||||
break;
|
||||
case SETTING_RSOUND_SERVER_IP_ADDRESS:
|
||||
cellDbgFontPuts(0.5f, menu_generalaudiosettings.items[menu_generalaudiosettings.items[switchvalue].enum_id].text_ypos, FONT_SIZE, strcmp(Settings.RSoundServerIPAddress,"0.0.0.0") ? ORANGE : GREEN, Settings.RSoundServerIPAddress);
|
||||
break;
|
||||
case SETTING_THROTTLE_MODE:
|
||||
case SETTING_ENABLE_SCREENSHOTS:
|
||||
case SETTING_TRIPLE_BUFFERING:
|
||||
case SETTING_SCALE_ENABLED:
|
||||
case SETTING_APPLY_SHADER_PRESET_ON_STARTUP:
|
||||
cellDbgFontPuts(0.5f, menu_generalvideosettings.items[menu_generalvideosettings.items[switchvalue].enum_id].text_ypos, FONT_SIZE, *(menu_generalvideosettings.items[switchvalue].setting_ptr) ? GREEN : ORANGE, *(menu_generalvideosettings.items[switchvalue].setting_ptr) ? "ON" : "OFF");
|
||||
break;
|
||||
case SETTING_EMU_CURRENT_SAVE_STATE_SLOT:
|
||||
cellDbgFontPrintf(0.5f, menu_emu_settings.items[menu_emu_settings.items[switchvalue].enum_id].text_ypos, FONT_SIZE, Settings.CurrentSaveStateSlot == MIN_SAVE_STATE_SLOT ? GREEN : ORANGE, "%d", Settings.CurrentSaveStateSlot);
|
||||
cellDbgFontPrintf(0.5f, menu_emu_settings.items[menu_emu_settings.items[switchvalue].enum_id].text_ypos, FONT_SIZE, g_extern.state_slot == 0 ? GREEN : ORANGE, "%d", g_extern.state_slot);
|
||||
break;
|
||||
case SETTING_PATH_DEFAULT_ROM_DIRECTORY:
|
||||
cellDbgFontPuts (0.5f, menu_pathsettings.items[switchvalue].text_ypos, FONT_SIZE, !(strcmp(Settings.PS3PathROMDirectory,"/")) ? GREEN : ORANGE, Settings.PS3PathROMDirectory);
|
||||
break;
|
||||
case SETTING_PATH_SAVESTATES_DIRECTORY:
|
||||
cellDbgFontPuts (0.5f, menu_pathsettings.items[switchvalue].text_ypos, FONT_SIZE, !(strcmp(Settings.PS3PathSaveStates,usrDirPath)) ? GREEN : ORANGE, Settings.PS3PathSaveStates);
|
||||
break;
|
||||
case SETTING_PATH_SRAM_DIRECTORY:
|
||||
cellDbgFontPuts (0.5f, menu_pathsettings.items[switchvalue].text_ypos, FONT_SIZE, !(strcmp(Settings.PS3PathSRAM,usrDirPath)) ? GREEN : ORANGE, Settings.PS3PathSRAM);
|
||||
break;
|
||||
case SETTING_PATH_BASE_DIRECTORY:
|
||||
cellDbgFontPuts (0.5f, menu_pathsettings.items[switchvalue].text_ypos, FONT_SIZE, !(strcmp(Settings.PS3PathBaseDirectory,usrDirPath)) ? GREEN : ORANGE, Settings.PS3PathBaseDirectory);
|
||||
break;
|
||||
case SETTING_PATH_CHEATS:
|
||||
cellDbgFontPuts (0.5f, menu_pathsettings.items[switchvalue].text_ypos, FONT_SIZE, !(strcmp(Settings.PS3PathCheats,usrDirPath)) ? GREEN : ORANGE, Settings.PS3PathCheats);
|
||||
cellDbgFontPuts (0.5f, menu_pathsettings.items[switchvalue].text_ypos, FONT_SIZE, !(strcmp(g_settings.cheat_database,usrDirPath)) ? GREEN : ORANGE, g_settings.cheat_database);
|
||||
break;
|
||||
case SETTING_DEFAULT_VIDEO_ALL:
|
||||
case SETTING_SAVE_SHADER_PRESET:
|
||||
@ -772,10 +690,8 @@ static void display_label_value(uint64_t switchvalue)
|
||||
cellDbgFontDraw();
|
||||
break;
|
||||
case SETTING_CONTROLS_SCHEME:
|
||||
cellDbgFontPrintf(0.5f, menu_controlssettings.items[switchvalue].text_ypos, FONT_SIZE, Settings.ControlScheme == CONTROL_SCHEME_DEFAULT ? GREEN : ORANGE, Settings.PS3CurrentInputPresetTitle);
|
||||
break;
|
||||
case SETTING_CONTROLS_NUMBER:
|
||||
cellDbgFontPrintf(0.5f, menu_controlssettings.items[switchvalue].text_ypos, FONT_SIZE, currently_selected_controller_menu == 0 ? GREEN : ORANGE, "%d", currently_selected_controller_menu+1);
|
||||
break;
|
||||
case SETTING_CONTROLS_DPAD_UP:
|
||||
case SETTING_CONTROLS_DPAD_DOWN:
|
||||
@ -818,7 +734,7 @@ static void apply_scaling(void)
|
||||
{
|
||||
}
|
||||
|
||||
#include "menu/settings-logic.h"
|
||||
#include "settings-logic.h"
|
||||
|
||||
static void do_settings(menu * menu_obj)
|
||||
{
|
||||
@ -919,7 +835,6 @@ static void do_settings(menu * menu_obj)
|
||||
if (g_rom_loaded)
|
||||
{
|
||||
menu_is_running = 0;
|
||||
Emulator_StartROMRunning(1);
|
||||
set_text_message("", 15);
|
||||
}
|
||||
old_state = state;
|
||||
@ -1052,7 +967,7 @@ static void menu_init_settings_pages(menu * menu_obj)
|
||||
|
||||
void menu_init(void)
|
||||
{
|
||||
filebrowser_new(&browser, Settings.PS3PathROMDirectory, ROM_EXTENSIONS);
|
||||
filebrowser_new(&browser, "/", ROM_EXTENSIONS);
|
||||
|
||||
menu_init_settings_pages(&menu_generalvideosettings);
|
||||
menu_init_settings_pages(&menu_generalaudiosettings);
|
||||
@ -1107,6 +1022,5 @@ void menu_loop(void)
|
||||
|
||||
psglSwap();
|
||||
cellSysutilCheckCallback();
|
||||
cell_console_poll();
|
||||
}while (menu_is_running);
|
||||
}
|
||||
|
438
ps3/settings-logic.h
Normal file
438
ps3/settings-logic.h
Normal file
@ -0,0 +1,438 @@
|
||||
static void producesettingentry(uint64_t switchvalue)
|
||||
{
|
||||
uint64_t state;
|
||||
|
||||
state = cell_pad_input_poll_device(0);
|
||||
|
||||
switch(switchvalue)
|
||||
{
|
||||
case SETTING_EMU_CURRENT_SAVE_STATE_SLOT:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
if(g_extern.state_slot != 0)
|
||||
g_extern.state_slot--;
|
||||
|
||||
set_text_message("", 7);
|
||||
}
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
g_extern.state_slot++;
|
||||
set_text_message("", 7);
|
||||
}
|
||||
|
||||
if(CTRL_START(state))
|
||||
g_extern.state_slot = 0;
|
||||
|
||||
break;
|
||||
case SETTING_CHANGE_RESOLUTION:
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) )
|
||||
{
|
||||
//ps3graphics_next_resolution();
|
||||
set_text_message("", 7);
|
||||
}
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) )
|
||||
{
|
||||
//ps3graphics_previous_resolution();
|
||||
set_text_message("", 7);
|
||||
}
|
||||
if(CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
/*
|
||||
case SETTING_PAL60_MODE:
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_LEFT(state) || CTRL_CROSS(state) || CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state))
|
||||
{
|
||||
if (Graphics->GetCurrentResolution() == CELL_VIDEO_OUT_RESOLUTION_576)
|
||||
{
|
||||
if(Graphics->CheckResolution(CELL_VIDEO_OUT_RESOLUTION_576))
|
||||
{
|
||||
Settings.PS3PALTemporalMode60Hz = !Settings.PS3PALTemporalMode60Hz;
|
||||
Graphics->SetPAL60Hz(Settings.PS3PALTemporalMode60Hz);
|
||||
Graphics->SwitchResolution(Graphics->GetCurrentResolution(), Settings.PS3PALTemporalMode60Hz, Settings.TripleBuffering);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
*/
|
||||
#ifdef HAVE_GAMEAWARE
|
||||
case SETTING_GAME_AWARE_SHADER:
|
||||
if((CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_CROSS(state)) && Settings.ScaleEnabled)
|
||||
{
|
||||
menuStackindex++;
|
||||
menuStack[menuStackindex] = menu_filebrowser;
|
||||
menuStack[menuStackindex].enum_id = GAME_AWARE_SHADER_CHOICE;
|
||||
set_initial_dir_tmpbrowser = true;
|
||||
}
|
||||
if(CTRL_START(state) && Settings.ScaleEnabled)
|
||||
{
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case SETTING_SHADER_PRESETS:
|
||||
if(g_settings.video.render_to_texture)
|
||||
{
|
||||
if((CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_CROSS(state)) && g_settings.video.render_to_texture)
|
||||
{
|
||||
menuStackindex++;
|
||||
menuStack[menuStackindex] = menu_filebrowser;
|
||||
menuStack[menuStackindex].enum_id = PRESET_CHOICE;
|
||||
set_initial_dir_tmpbrowser = true;
|
||||
}
|
||||
}
|
||||
if(CTRL_START(state) && g_settings.video.render_to_texture)
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_BORDER:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
menuStackindex++;
|
||||
menuStack[menuStackindex] = menu_filebrowser;
|
||||
menuStack[menuStackindex].enum_id = BORDER_CHOICE;
|
||||
set_initial_dir_tmpbrowser = true;
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_SHADER:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
menuStackindex++;
|
||||
menuStack[menuStackindex] = menu_filebrowser;
|
||||
menuStack[menuStackindex].enum_id = SHADER_CHOICE;
|
||||
set_shader = 0;
|
||||
set_initial_dir_tmpbrowser = true;
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_SHADER_2:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_FONT_SIZE:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_KEEP_ASPECT_RATIO:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_HW_TEXTURE_FILTER:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
g_settings.video.smooth = !g_settings.video.smooth;
|
||||
//ps3graphics_set_smooth(Settings.PS3Smooth, 0);
|
||||
set_text_message("", 7);
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
g_settings.video.smooth = 1;
|
||||
//ps3graphics_set_smooth(Settings.PS3Smooth, 0);
|
||||
}
|
||||
break;
|
||||
case SETTING_HW_TEXTURE_FILTER_2:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
g_settings.video.second_pass_smooth = !g_settings.video.second_pass_smooth;
|
||||
set_text_message("", 7);
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
g_settings.video.second_pass_smooth = 1;
|
||||
}
|
||||
break;
|
||||
case SETTING_SCALE_ENABLED:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
g_settings.video.render_to_texture = !g_settings.video.render_to_texture;
|
||||
|
||||
if(g_settings.video.render_to_texture)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
set_text_message("", 7);
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
g_settings.video.fbo_scale_x = 2;
|
||||
g_settings.video.fbo_scale_y = 2;
|
||||
}
|
||||
break;
|
||||
case SETTING_SCALE_FACTOR:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_HW_OVERSCAN_AMOUNT:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_SOUND_MODE:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_RSOUND_SERVER_IP_ADDRESS:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_CROSS(state) | CTRL_LSTICK_RIGHT(state) )
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_THROTTLE_MODE:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_CROSS(state) || CTRL_LSTICK_RIGHT(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_TRIPLE_BUFFERING:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state))
|
||||
{
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_ENABLE_SCREENSHOTS:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state))
|
||||
{
|
||||
#if(CELL_SDK_VERSION > 0x340000)
|
||||
Settings.ScreenshotsEnabled = !Settings.ScreenshotsEnabled;
|
||||
if(Settings.ScreenshotsEnabled)
|
||||
{
|
||||
cellSysmoduleLoadModule(CELL_SYSMODULE_SYSUTIL_SCREENSHOT);
|
||||
CellScreenShotSetParam screenshot_param = {0, 0, 0, 0};
|
||||
|
||||
screenshot_param.photo_title = EMULATOR_NAME;
|
||||
screenshot_param.game_title = EMULATOR_NAME;
|
||||
cellScreenShotSetParameter (&screenshot_param);
|
||||
cellScreenShotEnable();
|
||||
}
|
||||
else
|
||||
{
|
||||
cellScreenShotDisable();
|
||||
cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_SCREENSHOT);
|
||||
}
|
||||
|
||||
set_text_message("", 7);
|
||||
#endif
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
#if(CELL_SDK_VERSION > 0x340000)
|
||||
Settings.ScreenshotsEnabled = false;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case SETTING_SAVE_SHADER_PRESET:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) | CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_APPLY_SHADER_PRESET_ON_STARTUP:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) | CTRL_LSTICK_RIGHT(state) || CTRL_START(state) || CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_DEFAULT_VIDEO_ALL:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) | CTRL_LSTICK_RIGHT(state) || CTRL_START(state) || CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_DEFAULT_AUDIO_ALL:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) | CTRL_LSTICK_RIGHT(state) || CTRL_START(state) || CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_PATH_DEFAULT_ROM_DIRECTORY:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
menuStackindex++;
|
||||
menuStack[menuStackindex] = menu_filebrowser;
|
||||
menuStack[menuStackindex].enum_id = PATH_DEFAULT_ROM_DIR_CHOICE;
|
||||
set_initial_dir_tmpbrowser = true;
|
||||
}
|
||||
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
}
|
||||
|
||||
break;
|
||||
case SETTING_PATH_SAVESTATES_DIRECTORY:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
menuStackindex++;
|
||||
menuStack[menuStackindex] = menu_filebrowser;
|
||||
menuStack[menuStackindex].enum_id = PATH_SAVESTATES_DIR_CHOICE;
|
||||
set_initial_dir_tmpbrowser = true;
|
||||
}
|
||||
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
//strcpy(Settings.PS3PathSaveStates, usrDirPath);
|
||||
}
|
||||
|
||||
break;
|
||||
case SETTING_PATH_SRAM_DIRECTORY:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
menuStackindex++;
|
||||
menuStack[menuStackindex] = menu_filebrowser;
|
||||
menuStack[menuStackindex].enum_id = PATH_SRAM_DIR_CHOICE;
|
||||
set_initial_dir_tmpbrowser = true;
|
||||
}
|
||||
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
//strcpy(Settings.PS3PathSRAM, "");
|
||||
}
|
||||
|
||||
break;
|
||||
#ifdef HAVE_CHEATS
|
||||
case SETTING_PATH_CHEATS:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
menuStackindex++;
|
||||
menuStack[menuStackindex] = menu_filebrowser;
|
||||
menuStack[menuStackindex].enum_id = PATH_CHEATS_DIR_CHOICE;
|
||||
set_initial_dir_tmpbrowser = true;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case SETTING_PATH_DEFAULT_ALL:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state) || CTRL_START(state))
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SETTING_CONTROLS_SCHEME:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_CROSS(state) | CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
menuStackindex++;
|
||||
menuStack[menuStackindex] = menu_filebrowser;
|
||||
menuStack[menuStackindex].enum_id = INPUT_PRESET_CHOICE;
|
||||
set_initial_dir_tmpbrowser = true;
|
||||
}
|
||||
break;
|
||||
case SETTING_CONTROLS_NUMBER:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
if(currently_selected_controller_menu != 0)
|
||||
currently_selected_controller_menu--;
|
||||
set_text_message("", 7);
|
||||
}
|
||||
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
if(currently_selected_controller_menu < 6)
|
||||
currently_selected_controller_menu++;
|
||||
set_text_message("", 7);
|
||||
}
|
||||
|
||||
if(CTRL_START(state))
|
||||
currently_selected_controller_menu = 0;
|
||||
|
||||
break;
|
||||
case SETTING_CONTROLS_DPAD_UP:
|
||||
case SETTING_CONTROLS_DPAD_DOWN:
|
||||
case SETTING_CONTROLS_DPAD_LEFT:
|
||||
case SETTING_CONTROLS_DPAD_RIGHT:
|
||||
case SETTING_CONTROLS_BUTTON_CIRCLE:
|
||||
case SETTING_CONTROLS_BUTTON_CROSS:
|
||||
case SETTING_CONTROLS_BUTTON_TRIANGLE:
|
||||
case SETTING_CONTROLS_BUTTON_SQUARE:
|
||||
case SETTING_CONTROLS_BUTTON_SELECT:
|
||||
case SETTING_CONTROLS_BUTTON_START:
|
||||
case SETTING_CONTROLS_BUTTON_L1:
|
||||
case SETTING_CONTROLS_BUTTON_R1:
|
||||
case SETTING_CONTROLS_BUTTON_L2:
|
||||
case SETTING_CONTROLS_BUTTON_R2:
|
||||
case SETTING_CONTROLS_BUTTON_L3:
|
||||
case SETTING_CONTROLS_BUTTON_R3:
|
||||
case SETTING_CONTROLS_BUTTON_L2_BUTTON_L3:
|
||||
case SETTING_CONTROLS_BUTTON_L2_BUTTON_R3:
|
||||
case SETTING_CONTROLS_BUTTON_L2_ANALOG_R_RIGHT:
|
||||
case SETTING_CONTROLS_BUTTON_L2_ANALOG_R_LEFT:
|
||||
case SETTING_CONTROLS_BUTTON_L2_ANALOG_R_UP:
|
||||
case SETTING_CONTROLS_BUTTON_L2_ANALOG_R_DOWN:
|
||||
case SETTING_CONTROLS_BUTTON_R2_ANALOG_R_RIGHT:
|
||||
case SETTING_CONTROLS_BUTTON_R2_ANALOG_R_LEFT:
|
||||
case SETTING_CONTROLS_BUTTON_R2_ANALOG_R_UP:
|
||||
case SETTING_CONTROLS_BUTTON_R2_ANALOG_R_DOWN:
|
||||
case SETTING_CONTROLS_BUTTON_R2_BUTTON_R3:
|
||||
case SETTING_CONTROLS_BUTTON_R3_BUTTON_L3:
|
||||
case SETTING_CONTROLS_ANALOG_R_UP:
|
||||
case SETTING_CONTROLS_ANALOG_R_DOWN:
|
||||
case SETTING_CONTROLS_ANALOG_R_LEFT:
|
||||
case SETTING_CONTROLS_ANALOG_R_RIGHT:
|
||||
if(CTRL_LEFT(state) | CTRL_LSTICK_LEFT(state))
|
||||
{
|
||||
//Input_MapButton(control_binds[currently_selected_controller_menu][(switchvalue-SETTING_CONTROLS_DPAD_UP)],false,NULL);
|
||||
set_text_message("", 7);
|
||||
}
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
//Input_MapButton(control_binds[currently_selected_controller_menu][(switchvalue-SETTING_CONTROLS_DPAD_UP)],true,NULL);
|
||||
set_text_message("", 7);
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
//Input_MapButton(control_binds[currently_selected_controller_menu][(switchvalue-SETTING_CONTROLS_DPAD_UP)],true, default_control_binds[switchvalue-SETTING_CONTROLS_DPAD_UP]);
|
||||
}
|
||||
break;
|
||||
case SETTING_CONTROLS_SAVE_CUSTOM_CONTROLS:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state) || CTRL_START(state))
|
||||
//emulator_save_settings(INPUT_PRESET_FILE);
|
||||
break;
|
||||
case SETTING_CONTROLS_DEFAULT_ALL:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state) || CTRL_START(state))
|
||||
{
|
||||
//emulator_set_controls("", SET_ALL_CONTROLS_TO_DEFAULT, "Default");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
39
ps3/shared.h
Normal file
39
ps3/shared.h
Normal file
@ -0,0 +1,39 @@
|
||||
/* SSNES - A Super Nintendo Entertainment System (SNES) Emulator frontend for libsnes.
|
||||
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2012 - Daniel De Matteis
|
||||
*
|
||||
* Some code herein may be based on code found in BSNES.
|
||||
*
|
||||
* SSNES is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* SSNES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with SSNES.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define MAX_PATH_LENGTH 1024
|
||||
|
||||
extern char special_action_msg[256];
|
||||
extern uint32_t special_action_msg_expired;
|
||||
|
||||
extern char contentInfoPath[MAX_PATH_LENGTH];
|
||||
extern char usrDirPath[MAX_PATH_LENGTH];
|
||||
extern char DEFAULT_PRESET_FILE[MAX_PATH_LENGTH];
|
||||
extern char DEFAULT_BORDER_FILE[MAX_PATH_LENGTH];
|
||||
extern char DEFAULT_MENU_BORDER_FILE[MAX_PATH_LENGTH];
|
||||
extern char GAME_AWARE_SHADER_DIR_PATH[MAX_PATH_LENGTH];
|
||||
extern char PRESETS_DIR_PATH[MAX_PATH_LENGTH];
|
||||
extern char INPUT_PRESETS_DIR_PATH[MAX_PATH_LENGTH];
|
||||
extern char BORDERS_DIR_PATH[MAX_PATH_LENGTH];
|
||||
extern char SHADERS_DIR_PATH[MAX_PATH_LENGTH];
|
||||
extern char DEFAULT_SHADER_FILE[MAX_PATH_LENGTH];
|
||||
extern char DEFAULT_MENU_SHADER_FILE[MAX_PATH_LENGTH];
|
||||
extern char SYS_CONFIG_FILE[MAX_PATH_LENGTH];
|
||||
extern char MULTIMAN_GAME_TO_BOOT[MAX_PATH_LENGTH];
|
||||
|
||||
extern void set_text_message(const char * message, uint32_t speed);
|
Loading…
Reference in New Issue
Block a user