File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -355,6 +355,13 @@ static void sdl_destroy_mouse_cursor(ALLEGRO_MOUSE_CURSOR *cursor)
355
355
ASSERT (sdl_cursor );
356
356
SDL_FreeCursor (sdl_cursor -> cursor );
357
357
al_free (sdl_cursor );
358
+
359
+ static int sdl_get_monitor_dpi (int adapter )
360
+ {
361
+ float ddpi , hdpi , vdpi ;
362
+ if (SDL_GetDisplayDPI (adapter , & ddpi , & hdpi , & vdpi ) < 0 )
363
+ return 72 ; // we can't indicate "unknown" so return something reasonable
364
+ return hdpi ;
358
365
}
359
366
360
367
static int sdl_get_num_display_modes (void )
@@ -411,7 +418,7 @@ ALLEGRO_SYSTEM_INTERFACE *_al_sdl_system_driver(void)
411
418
vt -> get_num_video_adapters = sdl_get_num_video_adapters ;
412
419
vt -> get_monitor_info = sdl_get_monitor_info ;
413
420
vt -> create_mouse_cursor = sdl_create_mouse_cursor ;
414
- vt -> destroy_mouse_cursor = sdl_destroy_mouse_cursor ;
421
+ vt -> get_monitor_dpi = sdl_get_monitor_dpi ;
415
422
/*vt->get_cursor_position = sdl_get_cursor_position;
416
423
vt->grab_mouse = sdl_grab_mouse;
417
424
vt->ungrab_mouse = sdl_ungrab_mouse;*/
You can’t perform that action at this time.
0 commit comments