Comments (2)
What would be the use case of this? You can always get the size of the window when the window is full screen. You'll also be able to get it if we implement #87.
I would be against setting the screen resolution, though. On macOS, at least, that's bad practice. This was a useful practice on CRT screens, but on LCD, your pixels are scaled anyway.
From Apple's documentation: Avoid changing the display resolution from that chosen by the user. If your application needs to render data at a lower resolution for performance reasons, you can explicitly create a back buffer at the desired resolution and allow OpenGL to scale those results to the display. See Controlling the Back Buffer Size.
On macOS this has other implications like having to capture the display and not allowing the user to do basic things like Cmd+Tab away or change their media volume. I've seen way too many games get this wrong...
from defos.
Hmm, that's a good point. Perhaps I am outdated in my thinking. I certainly agree that changing the display resolution is bad. And changing the game's resolution would be done on the game side of things (render target and whatnot). If you can get the full size of the display with #87, that would be fine.
from defos.
Related Issues (20)
- White flash on startup HOT 7
- Custom OS cursor breaking for macOS since recent update? HOT 12
- Need to change / improve method of setting HTML5 cursor
- Custom cursor images do not work in Microsoft Edge
- Multi monitor / tv setups can create issues with fullscreen mode HOT 2
- FPS cursor lock HOT 2
- Emscripten 1.39 support HOT 2
- hide cursor not working on mac HOT 2
- First input after toggling fullscreen not available on MacOS? HOT 1
- Should defos.on_click() be expanded to cover additional user interaction events? HOT 2
- Cross-platform custom cursors
- allow `clip cursor to game view area` for Linux HOT 1
- Set Window/View Size Before Game Start HOT 2
- Library stops project from building on linux HOT 8
- Changing the window title HOT 3
- Defos for dynamically scaling Defold game window in HTML5? HOT 2
- Toggling fullscreen re-enables window resize if previously disabled (Windows 10)
- Setting initial view size causes error `Could not find '@render' socket` HOT 4
- Updating to Clang 17 in Defold 1.6.2
- Windows 11, using defos.get_view_size() immediatly after defos.set_view_size() return different values. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from defos.