Fix some minor things found by running Sizer on PPSSPP

Sizer: https://github.com/aras-p/sizer
This commit is contained in:
Henrik Rydgård 2017-11-08 12:52:10 +01:00
parent 8fe171253d
commit 62b24edde1
3 changed files with 6 additions and 7 deletions

View file

@ -395,7 +395,7 @@ void SetDefaultKeyMap(DefaultMaps dmap, bool replace) {
UpdateNativeMenuKeys(); UpdateNativeMenuKeys();
} }
const KeyMap_IntStrPair key_names[] = { static const KeyMap_IntStrPair key_names[] = {
{NKCODE_A, "A"}, {NKCODE_A, "A"},
{NKCODE_B, "B"}, {NKCODE_B, "B"},
{NKCODE_C, "C"}, {NKCODE_C, "C"},
@ -586,7 +586,7 @@ const KeyMap_IntStrPair key_names[] = {
{NKCODE_RIGHTBRACE, "}"}, {NKCODE_RIGHTBRACE, "}"},
}; };
const KeyMap_IntStrPair axis_names[] = { static const KeyMap_IntStrPair axis_names[] = {
{JOYSTICK_AXIS_X, "X Axis"}, {JOYSTICK_AXIS_X, "X Axis"},
{JOYSTICK_AXIS_Y, "Y Axis"}, {JOYSTICK_AXIS_Y, "Y Axis"},
{JOYSTICK_AXIS_PRESSURE, "Pressure"}, {JOYSTICK_AXIS_PRESSURE, "Pressure"},
@ -874,7 +874,7 @@ void LoadFromIni(IniFile &file) {
IniFile::Section *controls = file.GetOrCreateSection("ControlMapping"); IniFile::Section *controls = file.GetOrCreateSection("ControlMapping");
for (size_t i = 0; i < ARRAY_SIZE(psp_button_names); i++) { for (size_t i = 0; i < ARRAY_SIZE(psp_button_names); i++) {
std::string value; std::string value;
controls->Get(psp_button_names[i].name.c_str(), &value, ""); controls->Get(psp_button_names[i].name, &value, "");
// Erase default mapping // Erase default mapping
g_controllerMap.erase(psp_button_names[i].key); g_controllerMap.erase(psp_button_names[i].key);
@ -913,7 +913,7 @@ void SaveToIni(IniFile &file) {
value += ","; value += ",";
} }
controls->Set(psp_button_names[i].name.c_str(), value, ""); controls->Set(psp_button_names[i].name, value, "");
} }
} }

View file

@ -86,7 +86,7 @@ namespace KeyMap {
// Key & Button names // Key & Button names
struct KeyMap_IntStrPair { struct KeyMap_IntStrPair {
int key; int key;
std::string name; const char *name;
}; };
// Use if you need to display the textual name // Use if you need to display the textual name

View file

@ -46,8 +46,7 @@ typedef struct PspUsbCamSetupVideoParam {
int evlevel; int evlevel;
} PspUsbCamSetupVideoParam; } PspUsbCamSetupVideoParam;
static const unsigned char sceUsbCamDummyImage[] = {
static unsigned char sceUsbCamDummyImage[] = {
0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x60, 0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x60,
0x00, 0x60, 0x00, 0x00, 0xFF, 0xE1, 0x00, 0x68, 0x45, 0x78, 0x69, 0x66, 0x00, 0x00, 0x4D, 0x4D, 0x00, 0x60, 0x00, 0x00, 0xFF, 0xE1, 0x00, 0x68, 0x45, 0x78, 0x69, 0x66, 0x00, 0x00, 0x4D, 0x4D,
0x00, 0x2A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x01, 0x1A, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x01, 0x1A, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01,