Skip to content

Commit

Permalink
Fix swap x/o feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cy33hc committed Mar 28, 2021
1 parent cda6bd7 commit b8c92a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ include("${VITASDK}/share/vita.cmake" REQUIRED)

set(VITA_APP_NAME "Launcher")
set(VITA_TITLEID "SMLA00001")
set(VITA_VERSION "02.80")
set(VITA_VERSION "02.81")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-psabi -Wunused-variable -Wwrite-strings -fpermissive -std=c++17 -Wimplicit-fallthrough")
Expand Down
12 changes: 10 additions & 2 deletions src/launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ namespace Windows {

if (!show_categories_as_tabs)
{
if ((pad_prev.buttons & SCE_CTRL_CIRCLE) && !(pad.buttons & SCE_CTRL_CIRCLE) && !paused)
if ((((pad_prev.buttons & SCE_CTRL_CIRCLE) && !(pad.buttons & SCE_CTRL_CIRCLE) && !swap_xo) ||
((pad_prev.buttons & SCE_CTRL_CROSS) && !(pad.buttons & SCE_CTRL_CROSS) && swap_xo)) && !paused)
{
if (current_category->current_folder != &current_category->folders[0])
{
Expand Down Expand Up @@ -358,7 +359,14 @@ namespace Windows {
}
else
{
ImGui_ImplVita2D_DisableButtons(SCE_CTRL_SQUARE | SCE_CTRL_CIRCLE);
if (swap_xo)
{
ImGui_ImplVita2D_DisableButtons(SCE_CTRL_SQUARE | SCE_CTRL_CROSS);
}
else
{
ImGui_ImplVita2D_DisableButtons(SCE_CTRL_SQUARE | SCE_CTRL_CIRCLE);
}
}
}
}
Expand Down

0 comments on commit b8c92a8

Please sign in to comment.