Jump to content

Fullscreen??


cassius
 Share

Recommended Posts

Since entering the line below I get a dialog which says my program is not orking but when I close the dialog my program runs fine in fullscreen mode , but whats the cause?

 

window = Window::Create("Wanderlath", 0, 0, 1024,768,Window::FullScreen);

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Link to comment
Share on other sites

local windowstyle = window.Fullscreen --edited here choose between Fullscreen and Titlebar

if System:GetProperty("fullscreen")=="1" then windowstyle=windowstyle+window.FullScreen end

window=Window:Create(title,0,0,System:GetProperty("screenwidth","1920"),System:GetProperty("screenheight","1080"),windowstyle)

window:HideMouse()

 

That line in the main.lua script or app.lua ( which you have got) should do it

it is under the line "--create a window"

Link to comment
Share on other sites

in C++:

unsigned int windowStyle = Window::Titlebar | Window::Center;
if( stoi(System::GetProperty("fullscreen")) )
   windowStyle = Window::FullScreen;

unsigned int width = stoi(System::GetProperty("width", "1920"));
unsigned int height = stoi(System::GetProperty("height", "1080"));

Window* window = Leadwerks::Window::Create("Test", 0, 0, width, height, windowStyle );

Link to comment
Share on other sites

Thanks t both for answers. I think my single line of code should be enough and in fact it does work after I close the error reporting dialog.

 

In le 2 it only took 1 line of code to get fullscreen the last parameter being "32"..

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Link to comment
Share on other sites

In le 2 it only took 1 line of code to get fullscreen the last parameter being "32"..

 

Same in the new ones, it's only the last parameter that matters, but it's Window::FullScreen instead of 32.

The rest of the code is just fluff.

 

You may want to get the system width/height for that window, actually. I don't believe LE has a method to determine the current monitor width/height (only supported ones), though so you'd have to rely on native calls.

 

On Windows (I don't know how on *nix):

unsigned int width = GetSystemMetrics(SM_CXSCREEN);
unsigned int height = GetSystemMetrics(SM_CYSCREEN);

Link to comment
Share on other sites

It only takes one parameter in LE3 as well to go fullscreen. And technically, the last parameter, window style, is set to fullscreen when the value is equal to Window::FullScreen which is equal to 64 in LE3. Granted you should always use the defined variable as Josh might change the value at any given moment. As for your issue: So it only happens when you use a window style of FullScreen? Does it do it when the style is set to Center? What is the native resolution of your system? Try printing out your supported resolutions using the CountGraphicsModes and GetGraphicsMode.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

You might try uploading a simple EXE that produces the error. I have no idea what that could mean, it sounds like some funny graphics driver thing.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

The dialog that appears says the program is not responding, but I just found that if I do nothing the dialog goes off on its own and my game runs ok.

 

Its just a nuisance but nothing more.

 

I sometimes get this Not responding dialog when running the editor too.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...