Andr3wHur5t Posted June 20, 2010 Share Posted June 20, 2010 is there a comand to get the screen height, and width? Quote Tools: AC3D | 3D Canvas(pro) | Texture Maker(pro) | Genetica(basic) | 3D World Studio | Fragmotion |Leadwerks 2 | XNA 4 | Visual Studio 2010 Professional | XCode 5.x |UU3D Pro Programing & Scripting Languages: C |C++ | C# | Obj-C | LUA | Javascript | PHP | Ruby Link to comment Share on other sites More sharing options...
Andr3wHur5t Posted June 20, 2010 Author Share Posted June 20, 2010 that gets the window height, width i need the screen height, width. thanks for the sugestion, Quote Tools: AC3D | 3D Canvas(pro) | Texture Maker(pro) | Genetica(basic) | 3D World Studio | Fragmotion |Leadwerks 2 | XNA 4 | Visual Studio 2010 Professional | XCode 5.x |UU3D Pro Programing & Scripting Languages: C |C++ | C# | Obj-C | LUA | Javascript | PHP | Ruby Link to comment Share on other sites More sharing options...
Canardia Posted June 20, 2010 Share Posted June 20, 2010 screenwidth = GetSystemMetrics(0); // returns the windows desktop width (works also in fullscreen mode) // cool trick: get screen width BEFORE switching to fullscreen mode, to // get fullscreen at native (=maximum, or user preferred) LCD resolution! screenheight = GetSystemMetrics(1); // returns the windows desktop height windowwidth = GetWindowWidth(); // returns the LE window width windowheight = GetWindowHeight(); // returns the LE window height bufferwidth = GetBufferWidth(buf); // returns the LE drawing buffer width (useful when you don't want // to draw on the whole window (speed up, cinemascope, // 2 player split screen, etc... )) bufferheight = GetBufferHeight(buf); // returns the LE drawing buffer height Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Andr3wHur5t Posted June 21, 2010 Author Share Posted June 21, 2010 Tanks,Lumooja that worked. Quote Tools: AC3D | 3D Canvas(pro) | Texture Maker(pro) | Genetica(basic) | 3D World Studio | Fragmotion |Leadwerks 2 | XNA 4 | Visual Studio 2010 Professional | XCode 5.x |UU3D Pro Programing & Scripting Languages: C |C++ | C# | Obj-C | LUA | Javascript | PHP | Ruby Link to comment Share on other sites More sharing options...
AggrorJorn Posted June 30, 2010 Share Posted June 30, 2010 always wondered that: lets say the users desktop resolution is 1440 x 900, but his game resolution is 800 x 600 fullscreen, how should you addept your game window to this? Do you need to addept/stretch the buffersizes ? Quote Link to comment Share on other sites More sharing options...
Canardia Posted June 30, 2010 Share Posted June 30, 2010 This is actually an quite extensive topic, since there are so many possibilities and hardware specific limitations. For example my GeForce 8800 GTS + Samsung 1680x1050 LCD combo can't display 16:9 ratio resolutions in fullscreen, but only 5:4 ratio and the native 1680x1050 16:10 ratio. I'm not sure if it's because of the GPU or the monitor, or both. Games should allow a seperate fullscreen resolution and buffer resolution, so that the correct aspect ratio can used, and additionally also the option to use clip&pan or black borders when the monitor's ratio does not match with the game's ratio. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.