Skip to content

Commit

Permalink
SDL: Migrate to common host interface
Browse files Browse the repository at this point in the history
It now supports controllers again. But you have to bind them in Qt.
  • Loading branch information
stenzek committed Apr 10, 2020
1 parent 6cfad33 commit 156a360
Show file tree
Hide file tree
Showing 7 changed files with 474 additions and 311 deletions.
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Other features include:
- Direct booting of homebrew executables
- Digital and analog controllers for input (rumble is forwarded to host)
- Qt and SDL frontends for desktop
- Qt frontend has graphical configuration, and controller binding
- Automatic content scanning - game titles/regions are provided by redump.org

## System Requirements
Expand Down Expand Up @@ -142,26 +141,25 @@ click the button next to button name, and press the key/button you want to use w

**Currently, it is only possible to bind one input to each controller button/axis. Multiple bindings per button are planned for the future.**

## Default keyboard bindings for SDL frontend
Keyboard bindings in the SDL frontend are currently not customizable. For reference:
- **D-Pad:** W/A/S/D or Up/Left/Down/Right
- **Triangle/Square/Circle/Cross:** I/J/L/K or Numpad8/Numpad4/Numpad6/Numpad2
## Bindings for SDL frontend
Keyboard bindings in the SDL frontend are currently not customizable in the frontend itself. You should use the Qt frontend to set up your key/controller bindings first.

## Default bindings
Controller 1:
- **D-Pad:** W/A/S/D
- **Triangle/Square/Circle/Cross:** Numpad8/Numpad4/Numpad6/Numpad2
- **L1/R1:** Q/E
- **L2/L2:** 1/3
- **Start:** Enter
- **Select:** Backspace

Gamepads are automatically detected and supported. Tested with an Xbox One controller.
To access the menus with the controller, press the right stick down and use the D-Pad to navigate, A to select.

## Useful hotkeys for SDL frontend
- **F1-F8:** Quick load/save (hold shift to save)
- **F11:** Toggle fullscreen
Hotkeys:
- **Escape:** Power off console
- **ALT+ENTER:** Toggle fullscreen
- **Tab:** Temporarily disable speed limiter
- **Pause/Break:** Pause/resume emulation
- **Space:** Frame step
- **End:** Toggle software renderer
- **Page Up/Down:** Increase/decrease resolution scale in hardware renderers
- **End:** Toggle software renderer

## Tests
- Passes amidog's CPU and GTE tests in both interpreter and recompiler modes, partial passing of CPX tests
Expand Down
1 change: 1 addition & 0 deletions src/duckstation-sdl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ add_executable(duckstation-sdl
opengl_host_display.h
sdl_host_interface.cpp
sdl_host_interface.h
sdl_key_names.h
)

target_include_directories(duckstation-sdl PRIVATE ${SDL2_INCLUDE_DIRS})
Expand Down
3 changes: 2 additions & 1 deletion src/duckstation-sdl/duckstation-sdl.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<ClInclude Include="imgui_impl_sdl.h" />
<ClInclude Include="opengl_host_display.h" />
<ClInclude Include="sdl_host_interface.h" />
<ClInclude Include="sdl_key_names.h" />
</ItemGroup>
<ItemGroup>
<Manifest Include="duckstation-sdl.manifest" />
Expand Down Expand Up @@ -394,4 +395,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
1 change: 1 addition & 0 deletions src/duckstation-sdl/duckstation-sdl.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<ClInclude Include="sdl_host_interface.h" />
<ClInclude Include="d3d11_host_display.h" />
<ClInclude Include="imgui_impl_sdl.h" />
<ClInclude Include="sdl_key_names.h" />
</ItemGroup>
<ItemGroup>
<Manifest Include="duckstation-sdl.manifest" />
Expand Down
Loading

0 comments on commit 156a360

Please sign in to comment.