Get screen resolution

Is there any script to get total screen resolution not game res?
Do you mean fullscreen or a bigger resolution?

If you want a fullscreen plugin that allows you to change between window and fullscreen mode, maybe this.

If you want a bigger resolution, maybe this?
No, i want to change res in fullscreen mode based on screen resolution (not game resolution) or fullscreen menu with res changing that saves config
You can use the following:
Code:
window.screen.width;
window.screen.height;
Which should be relatively straightforward.

However, in the age of High DPI screens, those values might not be entirely accurate. This is especially true for PCs with High DPI screens or mobile devices.

To get the actual screen resolution, regardless of DPI, you need to multiply those values with the devicePixelRatio, like this:
Code:
window.screen.width * window.devicePixelRatio;
window.screen.height * window.devicePixelRatio;


In my case, I have a High DPI 4k screen. That is 3840 x 2160 pixels at 150% scaling.
The first code would give me the following results:
2560
1440

The second gives me this:
3840
2160
So use 2nd script or 1st script for 1600x900?
So both works

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/get-screen-resolution.94067/