WARNING: Support high DPI displays
This change could break things. So, I created SUPPORT_HIGH_DPI flag to enable it (disabled by default). Basically, it detects HighDPI display and scales all drawing (and mouse input) appropiately to match the equivalent "standardDPI" screen size on highDPI. It uses screenScaling matrix to do that. This scaling comes with some undesired effects, like aliasing on default font text (keep in mind that font is pixel-perfect, not intended for any non-rounded scale factor). The only solution for this aliasing would be some AA postpro filter or implementing the highDPI scaling in a different way: rendering to a texture and scaling it with FILTER_BILINEAR, check `core_window_scale_letterbox.c` example for reference. Use at your own risk.
This commit is contained in:
parent
270f563964
commit
bb2841a26d
2 changed files with 59 additions and 75 deletions
|
@ -50,6 +50,8 @@
|
|||
#define SUPPORT_SCREEN_CAPTURE 1
|
||||
// Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback()
|
||||
#define SUPPORT_GIF_RECORDING 1
|
||||
// Allow scale all the drawn content to match the high-DPI equivalent size (only PLATFORM_DESKTOP)
|
||||
//#define SUPPORT_HIGH_DPI 1
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue