Charles Dang
de1a9724eb
Refactored handling of window/renderer size getters
...
* Removed display::screen_area(), display::w(), and display::h().
* Moved the global screen_area() function into the CVideo class.
* Renamed CVideo::getx() and gety() to get_width() and get_height()
* Made those two functions return the result of screen_area() instead of the other way around.
* Added preliminary support for high-DPI rendering to screen_area()
Note on the last point: When I fixed bug #1772 (aa8f6c7e7 right now but will probably change with rebasing)
I noted that SDL_GetWindowSize and SDL_GetRendererOutputSize returned the same results for me (even with
Window's automatic scaling for non-high-DPI-enabled apps disabled) but that the SDL documentation stated the
former returned screen coordinates and the latter pixels. In that same commit I changed the dimension functions
to use SDL_GetWindowSize. I've now reversed that decision and gone back to using SDL_GetRendererOutputSize so
I can guarantee output in pixels. If use_pixels is false, the code will return coordinates in 96 DPI, so I need
to have pixel measurements for the calculations.
Again, though, I do not know if SDL_GetWindowSize returns a different value that pixel size (which it's said
to do) on macOS or iOS. I'll need to do some testing. It's possible on those platforms I won't need the 96 DPI
measurements, but it's also possible it will be needed on on platforms, since all of our code relies on pixel
measurements.
2017-12-05 10:50:10 +11:00
..
2017-12-03 09:05:39 +11:00
2017-12-03 07:37:12 +11:00
2017-12-03 09:05:39 +11:00
2017-12-03 07:37:12 +11:00
2017-11-21 14:20:14 +11:00
2017-12-03 09:05:39 +11:00
2017-11-29 11:01:25 +11:00
2017-11-20 19:24:41 +11:00
2017-12-03 09:05:39 +11:00
2017-12-03 07:37:12 +11:00
2017-11-21 18:24:45 +11:00
2017-12-05 10:50:10 +11:00
2017-12-05 10:50:10 +11:00
2017-11-27 15:59:38 +11:00
2017-10-10 18:04:10 +11:00
2017-12-03 07:37:12 +11:00
2017-12-01 20:46:06 -06:00
2017-12-03 09:05:39 +11:00
2017-11-30 19:44:38 +02:00
2017-12-03 06:26:07 +11:00
2017-09-20 14:42:35 +02:00
2017-12-03 09:05:39 +11:00
2017-11-24 01:14:03 +11:00
2017-10-09 22:49:45 -04:00
2017-05-22 00:34:05 -04:00
2017-12-03 09:05:39 +11:00
2017-12-03 16:49:54 -06:00
2017-12-03 09:05:39 +11:00
2017-11-29 08:04:08 +11:00
2017-12-03 09:05:39 +11:00
2017-12-05 10:50:10 +11:00
2017-10-27 21:28:06 +03:00
2017-05-22 01:32:54 +11:00
2017-12-03 07:37:12 +11:00
2017-05-09 19:41:37 +11:00
2017-05-11 21:21:30 +11:00
2017-07-19 20:06:33 +09:30
2017-07-19 20:06:33 +09:30
2017-09-05 06:25:25 +11:00
2017-05-09 19:41:37 +11:00
2017-11-28 21:38:56 +02:00
2017-05-09 19:41:37 +11:00
2017-05-09 19:41:37 +11:00
2017-06-04 10:36:01 -05:00
2017-05-25 03:08:20 -04:00
2017-12-02 19:18:32 +01:00
2017-05-19 05:20:16 +11:00
2017-11-21 18:24:45 +11:00
2017-12-03 07:37:12 +11:00
2017-05-09 19:41:37 +11:00
2017-12-03 20:06:36 -06:00
2017-05-09 19:41:37 +11:00
2017-04-09 23:59:21 +11:00
2017-05-09 19:41:37 +11:00
2017-11-18 22:09:22 +02:00
2017-07-22 23:35:53 +03:00
2017-05-22 10:49:13 +11:00
2017-07-25 12:12:09 -05:00
2017-11-10 08:11:55 +11:00
2017-05-09 19:41:37 +11:00
2017-12-02 19:18:32 +01:00
2017-12-02 19:18:32 +01:00
2017-04-28 17:15:13 +11:00
2017-12-05 10:50:10 +11:00
2017-11-21 03:07:23 +11:00
2017-05-04 11:04:19 +11:00
2017-12-03 09:05:39 +11:00
2017-05-17 22:58:40 +11:00
2017-05-09 19:41:37 +11:00
2017-05-12 15:56:41 -04:00
2017-05-09 19:41:37 +11:00
2017-04-26 05:13:17 +11:00
2017-05-09 19:41:37 +11:00
2017-12-05 10:50:10 +11:00
2017-12-05 10:50:10 +11:00
2017-12-05 10:50:10 +11:00
2017-05-09 19:41:37 +11:00
2017-05-09 19:41:37 +11:00
2017-05-09 19:41:37 +11:00
2017-05-09 19:41:37 +11:00
2017-11-24 01:14:03 +11:00
2017-05-12 15:56:41 -04:00
2017-10-04 07:26:30 +03:00
2017-10-12 20:46:10 +03:00
2017-05-09 19:41:37 +11:00
2017-12-05 10:50:10 +11:00
2017-09-05 06:25:25 +11:00
2017-12-03 09:05:39 +11:00
2017-05-04 11:04:19 +11:00
2017-05-09 19:41:37 +11:00
2017-05-09 19:41:37 +11:00
2017-09-01 23:24:04 +03:00
2017-09-01 23:24:04 +03:00
2017-10-27 02:00:15 +11:00
2017-10-27 02:00:15 +11:00
2017-11-21 03:07:23 +11:00
2017-11-21 03:07:23 +11:00
2017-08-15 11:24:23 +11:00
2017-08-14 12:36:08 -04:00
2017-04-25 04:30:49 +11:00
2017-05-09 19:41:37 +11:00
2017-11-28 06:38:19 +11:00
2017-12-03 09:05:39 +11:00
2017-05-16 06:46:43 +11:00
2017-05-09 19:41:37 +11:00
2017-11-27 05:53:23 +11:00
2017-05-09 19:41:37 +11:00
2017-11-07 18:11:05 +11:00
2017-05-19 06:50:57 +11:00
2017-05-09 19:41:37 +11:00
2017-11-24 01:14:03 +11:00
2017-05-09 19:41:37 +11:00
2017-05-09 19:41:37 +11:00
2017-11-20 07:38:35 +02:00
2017-05-16 06:46:43 +11:00
2017-08-02 20:41:26 -04:00
2017-08-02 20:41:26 -04:00
2017-11-10 00:42:13 +11:00
2017-09-05 06:25:29 +11:00
2017-09-21 11:16:28 +02:00
2017-05-09 19:41:37 +11:00
2017-05-04 11:04:19 +11:00
2017-05-09 19:41:37 +11:00
2017-07-26 22:17:28 -04:00
2017-05-09 19:41:37 +11:00
2017-05-10 14:15:15 +11:00
2017-05-09 19:41:37 +11:00
2017-10-27 21:28:06 +03:00
2017-05-09 19:41:37 +11:00
2017-08-05 19:34:53 +03:00
2017-05-09 19:41:37 +11:00
2017-09-12 17:01:45 +02:00
2017-09-12 17:01:45 +02:00
2017-05-09 19:41:37 +11:00
2017-07-19 13:06:46 +02:00
2017-11-28 06:38:19 +11:00
2017-12-03 09:05:39 +11:00
2017-11-10 08:11:55 +11:00
2017-12-03 09:05:39 +11:00
2017-12-03 09:05:39 +11:00
2017-10-12 10:28:32 +03:00
2017-11-28 06:38:19 +11:00
2017-09-13 12:40:53 +11:00
2017-04-25 04:30:49 +11:00
2017-05-09 19:41:37 +11:00
2017-11-24 23:16:33 +11:00
2017-11-24 23:16:33 +11:00
2017-05-04 11:04:19 +11:00
2017-05-09 19:41:37 +11:00
2017-04-21 08:00:52 +11:00
2017-05-09 19:41:37 +11:00
2017-05-09 19:41:37 +11:00
2017-11-24 18:18:42 +03:00
2017-11-24 18:18:42 +03:00
2017-05-09 19:41:37 +11:00
2017-05-09 19:41:37 +11:00
2017-05-09 19:41:37 +11:00
2017-05-09 19:41:37 +11:00
2017-10-06 12:27:39 +11:00
2017-05-09 19:41:37 +11:00
2017-12-03 07:18:23 +11:00
2017-11-24 02:50:44 +11:00
2017-12-03 07:18:23 +11:00
2017-11-24 02:50:44 +11:00
2017-12-03 07:18:23 +11:00
2017-12-03 09:05:39 +11:00
2017-08-02 19:36:43 +02:00
2017-05-09 19:41:37 +11:00
2017-11-24 01:14:03 +11:00
2017-05-09 19:41:37 +11:00
2017-11-20 19:24:41 +11:00
2017-05-09 19:41:37 +11:00
2017-04-21 08:00:52 +11:00
2017-05-09 19:41:37 +11:00
2017-04-21 03:05:52 +11:00
2017-05-09 19:41:37 +11:00
2017-04-21 03:05:52 +11:00
2017-05-09 19:41:37 +11:00
2017-04-24 12:16:21 +11:00
2017-05-09 19:41:37 +11:00
2017-11-28 06:38:19 +11:00
2017-07-25 12:12:09 -05:00
2017-12-03 07:37:12 +11:00
2017-05-09 19:41:37 +11:00
2017-09-03 01:07:06 +11:00
2017-09-03 01:07:06 +11:00
2017-12-03 07:37:12 +11:00
2017-12-03 09:05:39 +11:00
2017-10-26 09:27:50 +11:00
2017-08-20 08:50:07 +11:00
2017-12-03 09:05:39 +11:00
2017-05-09 19:41:37 +11:00
2017-12-03 07:04:33 +11:00
2017-12-03 09:05:39 +11:00
2017-10-26 09:28:24 +11:00
2017-09-03 01:07:06 +11:00
2017-12-03 07:18:23 +11:00
2017-12-03 07:18:23 +11:00
2017-12-03 15:30:52 -06:00
2017-09-20 15:04:50 +02:00
2017-05-09 19:41:37 +11:00
2017-04-12 13:49:50 -04:00
2017-05-09 19:41:37 +11:00
2017-12-05 10:50:10 +11:00
2017-12-03 09:05:39 +11:00
2017-08-27 21:57:42 +02:00
2017-12-03 09:05:39 +11:00
2017-05-09 19:41:37 +11:00
2017-11-10 07:23:21 +11:00
2017-10-30 21:17:05 +01:00
2017-10-29 13:03:45 +01:00
2017-05-09 19:41:37 +11:00
2017-05-22 13:12:32 +11:00
2017-05-09 19:41:37 +11:00
2017-12-03 09:05:39 +11:00
2017-12-01 21:26:39 -06:00
2017-05-09 19:41:37 +11:00
2017-11-24 01:14:03 +11:00
2017-11-24 01:14:03 +11:00
2017-11-24 01:14:03 +11:00
2017-11-24 01:14:03 +11:00
2017-11-24 01:14:03 +11:00
2017-05-09 19:41:37 +11:00
2017-10-26 21:30:12 +11:00
2017-10-26 09:27:50 +11:00
2017-05-14 12:47:33 +02:00
2017-12-03 09:05:39 +11:00
2017-05-21 16:27:46 -04:00
2017-05-09 19:41:37 +11:00
2017-05-09 19:41:37 +11:00
2017-05-21 16:27:46 -04:00
2017-05-09 19:41:37 +11:00
2017-12-05 10:50:10 +11:00
2017-11-21 02:30:19 +11:00
2017-05-09 19:41:37 +11:00
2017-10-20 08:05:45 +11:00
2017-10-20 08:05:45 +11:00
2017-05-15 17:33:43 +11:00
2017-11-02 17:06:16 -05:00
2017-05-16 02:41:57 +11:00
2017-05-16 02:41:57 +11:00
2017-08-27 21:57:41 +02:00
2017-08-27 21:57:41 +02:00
2017-09-10 14:08:37 +11:00
2017-05-09 19:41:37 +11:00
2017-12-05 10:50:10 +11:00
2017-12-05 10:50:10 +11:00
2017-10-12 12:17:53 +11:00
2017-10-10 18:04:10 +11:00
2017-12-01 21:04:05 -06:00
2017-05-16 06:46:43 +11:00
2017-11-22 20:22:26 +11:00
2017-11-22 20:22:26 +11:00
2017-11-20 19:24:41 +11:00
2017-11-20 11:39:34 -06:00
2017-05-09 19:41:37 +11:00