Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 11-29-2021, 02:56 AM   #1
Neutronic
Human being with feelings
 
Neutronic's Avatar
 
Join Date: Sep 2013
Posts: 657
Default API: gfx.ext_retina Windows issue

gfx.ext_retina returns 2 on Win10 for non-HiDPI displays when the OS scaling is set to 200%.

Also, gfx.w/gfx.h are not doubled in this scenario, which makes it particularly tricky to work around the issue.

Hope this can be fixed.

Thanks!
Neutronic is offline   Reply With Quote
Old 11-29-2021, 03:41 AM   #2
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Don't expect anything to get doubled automatically, you have to do it yourself.


Look here
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 11-29-2021, 03:53 AM   #3
Neutronic
Human being with feelings
 
Neutronic's Avatar
 
Join Date: Sep 2013
Posts: 657
Default

Quote:
Originally Posted by amagalma View Post
Don't expect anything to get doubled automatically, you have to do it yourself.
Thanks, but not sure why you assume so:

Quote:
Originally Posted by API docs
gfx.ext_retina - to support hidpi/retina, callers should set to 1.0 on initialization, will be updated to 2.0 if high resolution display is supported, and if so gfx.w/gfx.h/etc will be doubled.
-- and that is exactly how it operates on macOS.

Though in any case, doubling (or lack thereof) is not the main issue here, but rather REAPER reporting 200% OS scaling as HiDPI on Windows.

Neutronic is offline   Reply With Quote
Old 11-29-2021, 04:02 AM   #4
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by Neutronic View Post
-- and that is exactly how it operates on macOS.
Yes, only on MacOS. On Windows and Linux it does not. ("Resize manually gfx window, if not MacOS", see Justin's code in the link I posted)

Quote:
Though in any case, doubling (or lack thereof) is not the main issue here, but rather REAPER reporting 200% OS scaling as HiDPI on Windows.
Yes, I am not sure about that. The devs will tell us if this is to be expected or not.

PS. What personally gets on my nerves is that MacOS must be treated specially in most cases when scripting/coding.. But that's how MacOS is I guess..
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 11-29-2021, 05:47 AM   #5
Neutronic
Human being with feelings
 
Neutronic's Avatar
 
Join Date: Sep 2013
Posts: 657
Default

Quote:
Originally Posted by amagalma View Post
Yes, only on MacOS. On Windows and Linux it does not. ("Resize manually gfx window, if not MacOS", see Justin's code in the link I posted)
Oh I missed the part that that's an official word, thanks! I have a version of this approach already implemented but it assumes that gfx elements should always be doubled on any OS, just like it's documented. If they never do on Win/Linux then that's an easy fix.

Quote:
Originally Posted by amagalma View Post
PS. What personally gets on my nerves is that MacOS must be treated specially in most cases when scripting/coding.. But that's how MacOS is I guess..
I know what you mean though it implies one codes primarily on Win/Linux. If it's the other way around then it's the others guys who demand special treatment. Just a matter of perspective. hehe Thankfully, there are not that many pitfalls when one knows where they are.

Neutronic is offline   Reply With Quote
Old 11-29-2021, 08:04 AM   #6
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

I'll update the docs to more accurately describe these differences
Justin is offline   Reply With Quote
Old 11-29-2021, 05:22 PM   #7
Neutronic
Human being with feelings
 
Neutronic's Avatar
 
Join Date: Sep 2013
Posts: 657
Default

Thanks Justin!
Neutronic is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.