This commit is contained in:
twinaphex 2017-04-29 16:20:26 +02:00
parent c8bf28842f
commit 6d4ac23f26

View File

@ -607,11 +607,11 @@ static INLINE void android_mouse_calculate_deltas(android_input_t *android,
float x, y;
float x_scale = 1;
float y_scale = 1;
video_viewport_t *custom_vp = video_viewport_get_custom();
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
if(custom_vp && av_info)
if(av_info)
{
video_viewport_t *custom_vp = video_viewport_get_custom();
const struct retro_game_geometry *geom = (const struct retro_game_geometry*)&av_info->geometry;
x_scale = 2 * (float)geom->base_width / (float)custom_vp->width;
y_scale = 2 * (float)geom->base_height / (float)custom_vp->height;