Skip to content

Commit

Permalink
[NDS] Make touch points DPI aware in pass through.
Browse files Browse the repository at this point in the history
  • Loading branch information
skylersaleh committed Jul 17, 2023
1 parent d6cbc56 commit 63f91a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2164,8 +2164,8 @@ void se_draw_lcd(uint8_t *data, int im_width, int im_height,int x, int y, int re
for(int i=0;i<SAPP_MAX_TOUCHPOINTS;++i){
if(gui_state.touch_points[i].active==false)continue;

float tx = gui_state.touch_points[i].pos[0];
float ty = gui_state.touch_points[i].pos[1];
float tx = gui_state.touch_points[i].pos[0]/se_dpi_scale();
float ty = gui_state.touch_points[i].pos[1]/se_dpi_scale();
tx-=x;
ty-=y;

Expand All @@ -2181,7 +2181,7 @@ void se_draw_lcd(uint8_t *data, int im_width, int im_height,int x, int y, int re
emu_state.joy.touch_pos[0]=rx;
emu_state.joy.touch_pos[1]=ry;
emu_state.joy.inputs[SE_KEY_PEN_DOWN]=true;
continue;
break;
}
}

Expand Down

0 comments on commit 63f91a4

Please sign in to comment.