| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Basic support for NSScreen.backingScaleFactor. Notice this solution don’t subscribe to NSScreen change (didChangeScreenProfileNotification), thus won’t respond to the screen change.
|
hi, sorry for this late response. Thanks your efforts and this PR looks great! As to your concerns, (1) yes, we should not write the dirty mark in every frame update. I have made some changes in #243 to fix this; (2) do you have any idea on this issue? maybe we can come up with some fallback solutions? (3) since we have implemented UIWidgetsMessageManager for ios and android already, it is ok to use our own UIWidgetsMessageManager on Mac too. |
Sorry, something went wrong.
|
@zhuxingwei 1) Alright, I will be looking into #243 to get this PR fully working and qualified to be merged when I am available. Also currently I am in a TOFEL school so probably cannot do much about this issue right now, sorry! 2) 2x NSWindow situation is actually rare (if you don't count the standalone resolution dialog). If so, there would be extra work but still can be solved on the native side. 3) Great, though I would like my implementation of UIWidgetsMessageManager to be reviewed by you guys as my implementation is just a POC. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is a working proof of concept of devicePixelRatio support on macOS standalone player. As that being said, the current progress may not suitable for direct production usage, but to provide an idea on how to do this on macOS.
Added Features
Changes
How this works
This is achieved by providing OSXDeviceScaleFactor the NSScreenUtils.m file:
This is a bit tricky because:
As the UnityOSXSendMessage link is established, we now send a "ViewportMatricsChanged" message whenever the screen change notification is triggered. The "UIWidgetViewController.keyboardChanged" argument is copied from the Java implementation and may need to change to a more suitable name.
In the Update function of DisplayMetrics.cs I added a line to invalidate the current scale factor, then in the next cycle UIWidgets would call OSXDeviceScaleFactor to get a new scale value.
Concern & To-do
Reference
Demo Video
demo.mp4.zip