Skip to content

Commit

Permalink
Cherry picked recent updates from dev branch
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Aug 21, 2021
1 parent 9432242 commit ff70f7a
Show file tree
Hide file tree
Showing 11 changed files with 165 additions and 126 deletions.
3 changes: 0 additions & 3 deletions .vs/ProjectSettings.json

This file was deleted.

7 changes: 0 additions & 7 deletions .vs/VSWorkspaceState.json

This file was deleted.

12 changes: 2 additions & 10 deletions VSLinux/Amiberry.sln
@@ -1,16 +1,14 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29324.140
# Visual Studio Version 17
VisualStudioVersion = 17.0.31612.314
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Amiberry", "Amiberry.vcxproj", "{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug-DMX-Pi3|ARM = Debug-DMX-Pi3|ARM
Debug-DMX-Pi3|ARM64 = Debug-DMX-Pi3|ARM64
Debux-DMX|ARM = Debux-DMX|ARM
Debux-DMX|ARM64 = Debux-DMX|ARM64
Release|ARM = Release|ARM
Expand All @@ -25,12 +23,6 @@ Global
{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}.Debug|ARM64.ActiveCfg = Debug|ARM64
{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}.Debug|ARM64.Build.0 = Debug|ARM64
{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}.Debug|ARM64.Deploy.0 = Debug|ARM64
{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}.Debug-DMX-Pi3|ARM.ActiveCfg = Debug-DMX-Pi3|ARM
{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}.Debug-DMX-Pi3|ARM.Build.0 = Debug-DMX-Pi3|ARM
{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}.Debug-DMX-Pi3|ARM.Deploy.0 = Debug-DMX-Pi3|ARM
{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}.Debug-DMX-Pi3|ARM64.ActiveCfg = Debug-DMX-Pi3|ARM64
{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}.Debug-DMX-Pi3|ARM64.Build.0 = Debug-DMX-Pi3|ARM64
{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}.Debug-DMX-Pi3|ARM64.Deploy.0 = Debug-DMX-Pi3|ARM64
{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}.Debux-DMX|ARM.ActiveCfg = Debux-DMX|ARM
{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}.Debux-DMX|ARM.Build.0 = Debux-DMX|ARM
{7B9A67B2-3F13-4E7B-A875-AAB6CAAE63D7}.Debux-DMX|ARM.Deploy.0 = Debux-DMX|ARM
Expand Down
90 changes: 53 additions & 37 deletions VSLinux/Amiberry.vcxproj

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions VSLinux/Amiberry.vcxproj.user
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<RemoteDebuggerCommand>~/projects/amiberry/Amiberry-Debug</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>~/projects/amiberry</RemoteDebuggerWorkingDirectory>
<RemoteDebuggerCommand>$(RemoteRootDir)/amiberry/$(MSBuildProjectName)-Debug</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>$(RemoteRootDir)/amiberry</RemoteDebuggerWorkingDirectory>
<DebuggerFlavor>LinuxDebugger</DebuggerFlavor>
<PreLaunchCommand>export DISPLAY=:0.0</PreLaunchCommand>
<RemoteTarget>1721017924;rpi4 (username=, port=22, authentication=Password)</RemoteTarget>
<RemoteDebuggerCommandArguments>
</RemoteDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debux-DMX|ARM'">
<RemoteDebuggerCommand>~/projects/amiberry/Amiberry-Debug-dmx</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>~/projects/amiberry</RemoteDebuggerWorkingDirectory>
<RemoteDebuggerCommand>$(RemoteRootDir)/amiberry/$(MSBuildProjectName)-Debug-dmx</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>$(RemoteRootDir)/amiberry</RemoteDebuggerWorkingDirectory>
<DebuggerFlavor>LinuxDebugger</DebuggerFlavor>
<PreLaunchCommand>export DISPLAY=:0.0</PreLaunchCommand>
<RemoteTarget>1721017924;rpi4 (username=, port=22, authentication=Password)</RemoteTarget>
Expand All @@ -26,20 +26,20 @@
<RemoteDebuggerCommandArguments />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<RemoteDebuggerCommand>~/projects/amiberry/Amiberry-Debug</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>~/projects/amiberry</RemoteDebuggerWorkingDirectory>
<RemoteDebuggerCommand>$(RemoteRootDir)/amiberry/$(MSBuildProjectName)-Debug</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>$(RemoteRootDir)/amiberry</RemoteDebuggerWorkingDirectory>
<DebuggerFlavor>LinuxDebugger</DebuggerFlavor>
<PreLaunchCommand>export DISPLAY=:0.0</PreLaunchCommand>
<RemoteTarget>402471865;pi400 (username=, port=22, authentication=Password)</RemoteTarget>
<RemoteDebuggerCommandArguments>
</RemoteDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debux-DMX|ARM64'">
<RemoteDebuggerCommand>~/projects/amiberry/Amiberry-Debug</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>~/projects/amiberry</RemoteDebuggerWorkingDirectory>
<RemoteDebuggerCommand>$(RemoteRootDir)/amiberry/$(MSBuildProjectName)-Debug-dmx</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>$(RemoteRootDir)/amiberry</RemoteDebuggerWorkingDirectory>
<DebuggerFlavor>LinuxDebugger</DebuggerFlavor>
<PreLaunchCommand>export DISPLAY=:0.0</PreLaunchCommand>
<RemoteTarget>402471865;pi400 (username=, port=22, authentication=Password)</RemoteTarget>
<RemoteTarget>-1593321521;retropie (username=, port=22, authentication=Password)</RemoteTarget>
<RemoteDebuggerCommandArguments />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-DMX-Pi3|ARM64'">
Expand All @@ -65,29 +65,29 @@
<RemoteTarget>-1406338439;192.168.1.47 (username=, port=22, authentication=Password)</RemoteTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<RemoteDebuggerCommand>~/projects/amiberry/Amiberry-Release</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>~/projects/amiberry</RemoteDebuggerWorkingDirectory>
<RemoteDebuggerCommand>$(RemoteRootDir)/amiberry/$(MSBuildProjectName)-Release</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>$(RemoteRootDir)/amiberry</RemoteDebuggerWorkingDirectory>
<DebuggerFlavor>LinuxDebugger</DebuggerFlavor>
<PreLaunchCommand>export DISPLAY=:0.0</PreLaunchCommand>
<RemoteTarget>1721017924;rpi4 (username=, port=22, authentication=Password)</RemoteTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-DMX|ARM'">
<RemoteDebuggerCommand>~/projects/amiberry/Amiberry-Release-dmx</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>~/projects/amiberry</RemoteDebuggerWorkingDirectory>
<RemoteDebuggerCommand>$(RemoteRootDir)/amiberry/$(MSBuildProjectName)-Release-dmx</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>$(RemoteRootDir)/amiberry</RemoteDebuggerWorkingDirectory>
<DebuggerFlavor>LinuxDebugger</DebuggerFlavor>
<PreLaunchCommand>export DISPLAY=:0.0</PreLaunchCommand>
<RemoteTarget>1721017924;rpi4 (username=, port=22, authentication=Password)</RemoteTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<RemoteDebuggerCommand>~/projects/amiberry/Amiberry-Release</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>~/projects/amiberry</RemoteDebuggerWorkingDirectory>
<RemoteDebuggerCommand>$(RemoteRootDir)/amiberry/$(MSBuildProjectName)-Release</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>$(RemoteRootDir)/amiberry</RemoteDebuggerWorkingDirectory>
<DebuggerFlavor>LinuxDebugger</DebuggerFlavor>
<PreLaunchCommand>export DISPLAY=:0.0</PreLaunchCommand>
<RemoteTarget>-18943540;argon (username=, port=22, authentication=Password)</RemoteTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-DMX|ARM64'">
<RemoteDebuggerCommand>~/projects/amiberry/Amiberry-Release</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>~/projects/amiberry</RemoteDebuggerWorkingDirectory>
<RemoteDebuggerCommand>$(RemoteRootDir)/amiberry/$(MSBuildProjectName)-Release-dmx</RemoteDebuggerCommand>
<RemoteDebuggerWorkingDirectory>$(RemoteRootDir)/amiberry</RemoteDebuggerWorkingDirectory>
<DebuggerFlavor>LinuxDebugger</DebuggerFlavor>
<PreLaunchCommand>export DISPLAY=:0.0</PreLaunchCommand>
<RemoteTarget>402471865;pi400 (username=, port=22, authentication=Password)</RemoteTarget>
Expand All @@ -104,4 +104,4 @@
<DebuggerFlavor>LinuxDebugger</DebuggerFlavor>
<PreLaunchCommand>export DEBUG=0</PreLaunchCommand>
</PropertyGroup>
</Project>
</Project>
32 changes: 27 additions & 5 deletions src/osdep/amiberry.cpp
Expand Up @@ -90,6 +90,7 @@ amiberry_hotkey minimize_key;

bool lctrl, rctrl, lalt, ralt, lshift, rshift, lgui, rgui;

bool hotkey_pressed = false;
bool mouse_grabbed = false;

std::string get_version_string()
Expand Down Expand Up @@ -1012,6 +1013,7 @@ static void touch_event(unsigned long id, int pressrel, int x, int y, const SDL_
void process_event(SDL_Event event)
{
struct AmigaMonitor* mon = &AMonitors[0];
struct didata* did = &di_joystick[0];

if (event.type == SDL_WINDOWEVENT)
{
Expand Down Expand Up @@ -1105,6 +1107,21 @@ void process_event(SDL_Event event)
}
return;

case SDL_JOYBUTTONDOWN:
case SDL_JOYBUTTONUP:
if (event.jbutton.button == did->mapping.hotkey_button)
{
hotkey_pressed = (event.jbutton.state == SDL_PRESSED);
break;
}

if (event.jbutton.button == did->mapping.menu_button && hotkey_pressed && event.jbutton.state == SDL_PRESSED)
{
inputdevice_add_inputcode(AKS_ENTERGUI, 1, nullptr);
break;
}
return;

case SDL_KEYDOWN:
// if the key belongs to a "retro arch joystick" ignore it
// ONLY when in game though, we need to remove the joysticks really
Expand Down Expand Up @@ -2909,11 +2926,16 @@ int main(int argc, char* argv[])
max_uae_height = 8192;

// Get startup path
#ifdef ANDROID
strncpy(start_path_data, getenv("EXTERNAL_FILES_DIR"), MAX_DPATH - 1);
#else
getcwd(start_path_data, MAX_DPATH);
#endif
auto env_dir = getenv("EXTERNAL_FILES_DIR");
if (env_dir != nullptr)
{
strncpy(start_path_data, getenv("EXTERNAL_FILES_DIR"), MAX_DPATH - 1);
}
else
{
getcwd(start_path_data, MAX_DPATH);
}

rename_old_adfdir();
load_amiberry_settings();

Expand Down
9 changes: 5 additions & 4 deletions src/osdep/amiberry_filesys.cpp
Expand Up @@ -74,11 +74,12 @@ std::string iso_8859_1_to_utf8(std::string& str)

string prefix_with_application_directory_path(string currentpath)
{
#ifdef ANDROID
return getenv("EXTERNAL_FILES_DIR") + ("/" + currentpath);
#else
auto env_dir = getenv("EXTERNAL_FILES_DIR");
if (env_dir != nullptr)
{
return getenv("EXTERNAL_FILES_DIR") + ("/" + currentpath);
}
return currentpath;
#endif
}

int my_setcurrentdir(const TCHAR* curdir, TCHAR* oldcur)
Expand Down
62 changes: 34 additions & 28 deletions src/osdep/amiberry_input.cpp
Expand Up @@ -71,6 +71,7 @@ static void fill_default_controller()
default_controller_map.hotkey_button = SDL_CONTROLLER_BUTTON_INVALID;
default_controller_map.quit_button = SDL_CONTROLLER_BUTTON_INVALID;
default_controller_map.reset_button = SDL_CONTROLLER_BUTTON_INVALID;
default_controller_map.menu_button = SDL_CONTROLLER_BUTTON_INVALID;

default_controller_map.lstick_axis_y_invert = false;
default_controller_map.lstick_axis_x_invert = false;
Expand All @@ -93,6 +94,7 @@ static void fill_blank_controller()
default_controller_map.hotkey_button = SDL_CONTROLLER_BUTTON_INVALID;
default_controller_map.quit_button = SDL_CONTROLLER_BUTTON_INVALID;
default_controller_map.reset_button = SDL_CONTROLLER_BUTTON_INVALID;
default_controller_map.menu_button = SDL_CONTROLLER_BUTTON_INVALID;

default_controller_map.lstick_axis_y_invert = false;
default_controller_map.lstick_axis_x_invert = false;
Expand Down Expand Up @@ -741,37 +743,41 @@ static int init_joystick()
write_log("Retroarch controller cfg file found, using that for mapping\n");
fill_blank_controller();
did->mapping = default_controller_map;
did->mapping = map_from_retroarch(did->mapping, retroarch_config_file);

// WIP - not fully functional yet
//
//std::string binding;
//binding.assign(guid_str);
//binding += ",";
//binding += joystick_name[cpt];
//binding += ",platform:Linux";

//const auto map = binding_from_retroarch(cpt, retroarch_config_file);
//binding += map;

//// examples:
//// 341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7
//// 03000000c0160000dc27000001010000,OnyxSoft Dual JoyDivision,platform:Linux,a:b0,b:b1,x:b2,y:b3,start:b6,leftshoulder:b4,rightshoulder:b5,dpup:-a1,dpdown:+a1,dpleft:-a0,dpright:+a0,
//// 030000005e0400008e02000014010000,Xbox 360 Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b6,start:b7,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,

//const auto success = SDL_GameControllerAddMapping(binding.c_str());
//if (success == 1)
// write_log("Game Controller binding added as \"%s\".\n", binding.c_str());
//else if (success == 0)
// write_log("Game Controller binding updated as \"%s\".\n", binding.c_str());
//else if (success == -1)
// write_log("Failed to add/update Game Controller binding! SDL Error: %s\n", SDL_GetError());
did->mapping = map_from_retroarch(did->mapping, retroarch_config_file, -1);
}
else
{
fill_default_controller();
did->mapping = default_controller_map;
write_log("No Retroarch controller cfg file found, using the default mapping\n");
// Check if values are in retroarch.cfg
char retroarch_file[MAX_DPATH];
get_retroarch_file(retroarch_file, MAX_DPATH);
if (my_existsfile(retroarch_file))
{
int foundPlayer = -1;
for (auto p = 1; p < 5; p++) {
int pindex = find_retroarch(("input_player" + to_string(p) + "_joypad_index").c_str(), retroarch_file);
if (pindex == i) {
foundPlayer = p;
break;
}
}
if (foundPlayer != -1) {
write_log("Controller index found in retroarch cfg, using that for mapping\n");
fill_blank_controller();
did->mapping = default_controller_map;
did->mapping = map_from_retroarch(did->mapping, retroarch_file, foundPlayer);
}
else {
fill_default_controller();
did->mapping = default_controller_map;
write_log("No controller index found in retroarch cfg, using the default mapping\n");
}
}
else
{
fill_default_controller();
did->mapping = default_controller_map;
write_log("No Retroarch controller cfg file found, using the default mapping\n");
}
}

if (did->mapping.hotkey_button != SDL_CONTROLLER_BUTTON_INVALID)
Expand Down
3 changes: 2 additions & 1 deletion src/osdep/amiberry_input.h
Expand Up @@ -22,6 +22,7 @@ struct host_input_button {
int hotkey_button{};
int quit_button{};
int reset_button{};
int menu_button{};
int load_state_button{};
int save_state_button{};

Expand Down Expand Up @@ -85,4 +86,4 @@ extern std::string sanitize_retroarch_name(std::string s);
extern int find_retroarch(const TCHAR* find_setting, char* retroarch_file);
extern bool find_retroarch_polarity(const TCHAR* find_setting, char* retroarch_file);
extern std::string binding_from_retroarch(int cpt, char* control_config);
extern host_input_button map_from_retroarch(host_input_button mapping, char* control_config);
extern host_input_button map_from_retroarch(host_input_button mapping, char* control_config, int player);
4 changes: 3 additions & 1 deletion src/osdep/gui/main_window.cpp
Expand Up @@ -566,7 +566,9 @@ void check_input()
got_event = 1;
const int hat = SDL_JoystickGetHat(gui_joystick, 0);

if (gui_event.jbutton.button == static_cast<Uint8>(button_for_gui))
if (gui_event.jbutton.button == static_cast<Uint8>(button_for_gui) || (
SDL_JoystickGetButton(gui_joystick, did->mapping.menu_button) &&
SDL_JoystickGetButton(gui_joystick, did->mapping.hotkey_button)))
{
if (emulating && cmdStart->isEnabled())
{
Expand Down
33 changes: 21 additions & 12 deletions src/osdep/retroarch.cpp
Expand Up @@ -289,43 +289,52 @@ bool init_kb_from_retroarch(int index, char* retroarch_file)
return valid;
}

host_input_button map_from_retroarch(host_input_button mapping, char* control_config)
string ra_player_input(std::string retroarch_string, int player)
{
if (player != -1 && retroarch_string.find("input_") == 0)
retroarch_string.replace(0, 6, "input_player" + to_string(player) + "_");

return retroarch_string;
}

host_input_button map_from_retroarch(host_input_button mapping, char* control_config, int player)
{
mapping.is_retroarch = true;
mapping.hotkey_button = find_retroarch("input_enable_hotkey_btn", control_config);
mapping.quit_button = find_retroarch("input_exit_emulator_btn", control_config);
mapping.reset_button = find_retroarch("input_reset_btn", control_config);
mapping.menu_button = find_retroarch("input_menu_toggle_btn", control_config);

for (auto b = 0; b < SDL_CONTROLLER_BUTTON_MAX; b++)
{
mapping.button[b] = find_retroarch(retroarch_button_list[b].c_str(), control_config);
mapping.button[b] = find_retroarch(ra_player_input(retroarch_button_list[b], player).c_str(), control_config);
}

for (auto a = 0; a < SDL_CONTROLLER_AXIS_MAX; a++)
{
mapping.axis[a] = find_retroarch(retroarch_axis_list[a].c_str(), control_config);
mapping.axis[a] = find_retroarch(ra_player_input(retroarch_axis_list[a], player).c_str(), control_config);
}

if (mapping.axis[SDL_CONTROLLER_AXIS_LEFTX] == -1)
mapping.axis[SDL_CONTROLLER_AXIS_LEFTX] = find_retroarch("input_right_axis", control_config);
mapping.axis[SDL_CONTROLLER_AXIS_LEFTX] = find_retroarch(ra_player_input("input_right_axis", player).c_str(), control_config);

if (mapping.axis[SDL_CONTROLLER_AXIS_LEFTY] == -1)
mapping.axis[SDL_CONTROLLER_AXIS_LEFTY] = find_retroarch("input_down_axis", control_config);
mapping.axis[SDL_CONTROLLER_AXIS_LEFTY] = find_retroarch(ra_player_input("input_down_axis", player).c_str(), control_config);

// hats
mapping.number_of_hats = find_retroarch("count_hats", control_config);
mapping.number_of_hats = find_retroarch(ra_player_input("count_hats", player).c_str(), control_config);

// invert on axes
mapping.lstick_axis_y_invert = find_retroarch_polarity("input_down_axis", control_config);
mapping.lstick_axis_y_invert = find_retroarch_polarity(ra_player_input("input_down_axis", player).c_str(), control_config);
if (!mapping.lstick_axis_y_invert)
mapping.lstick_axis_y_invert = find_retroarch_polarity("input_l_y_plus_axis", control_config);
mapping.lstick_axis_y_invert = find_retroarch_polarity(ra_player_input("input_l_y_plus_axis", player).c_str(), control_config);

mapping.lstick_axis_x_invert = find_retroarch_polarity("input_right_axis", control_config);
mapping.lstick_axis_x_invert = find_retroarch_polarity(ra_player_input("input_right_axis", player).c_str(), control_config);
if (!mapping.lstick_axis_x_invert)
mapping.lstick_axis_x_invert = find_retroarch_polarity("input_l_x_plus_axis", control_config);
mapping.lstick_axis_x_invert = find_retroarch_polarity(ra_player_input("input_l_x_plus_axis", player).c_str(), control_config);

mapping.rstick_axis_x_invert = find_retroarch_polarity("input_r_x_plus_axis", control_config);
mapping.rstick_axis_y_invert = find_retroarch_polarity("input_r_y_plus_axis", control_config);
mapping.rstick_axis_x_invert = find_retroarch_polarity(ra_player_input("input_r_x_plus_axis", player).c_str(), control_config);
mapping.rstick_axis_y_invert = find_retroarch_polarity(ra_player_input("input_r_y_plus_axis", player).c_str(), control_config);

write_log("Controller Detection: invert left y axis: %d\n",
mapping.lstick_axis_y_invert);
Expand Down

0 comments on commit ff70f7a

Please sign in to comment.