Skip to content

Commit

Permalink
more android fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreRouma committed Mar 24, 2022
1 parent 58fcbbc commit 47b5474
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/backends/android/imgui/imgui_impl_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ int32_t ImGui_ImplAndroid_HandleInputEvent(AInputEvent* input_event)
// but we have to process them separately to identify the actual button pressed. This is done below via
// AMOTION_EVENT_ACTION_BUTTON_PRESS/_RELEASE. Here, we only process "FINGER" input (and "UNKNOWN", as a fallback).
if((AMotionEvent_getToolType(input_event, event_pointer_index) == AMOTION_EVENT_TOOL_TYPE_FINGER)
|| (AMotionEvent_getToolType(input_event, event_pointer_index) == AMOTION_EVENT_TOOL_TYPE_STYLUS)
|| (AMotionEvent_getToolType(input_event, event_pointer_index) == AMOTION_EVENT_TOOL_TYPE_MOUSE)
|| (AMotionEvent_getToolType(input_event, event_pointer_index) == AMOTION_EVENT_TOOL_TYPE_UNKNOWN))
{
io.AddMousePosEvent(AMotionEvent_getX(input_event, event_pointer_index), AMotionEvent_getY(input_event, event_pointer_index));
Expand Down
4 changes: 4 additions & 0 deletions core/src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ int sdrpp_main(int argc, char* argv[]) {

// Themes
defConfig["theme"] = "Dark";
#ifdef __ANDROID__
defConfig["uiScale"] = 3.0f;
#else
defConfig["uiScale"] = 1.0f;
#endif

defConfig["modules"] = json::array();

Expand Down

0 comments on commit 47b5474

Please sign in to comment.