Closed jrdoughty closed 2 years ago
HTML5 works as intended - browsers only allow fullscreen in response to an input event nowadays in which case method 2 works. Method 1 makes no sense for browsers for the same reason. Something is indeed wrong with the Windows target though...
PS: "HTML5 and hxcpp Windows" is not the build output - you can see the build output in the Terminal panel in vscode.
No, I was just confused, both methods work fine on Windows. Also tested with your code. What's the output you get on Windows?
ok... I apparently have a very different issue with Windows. My builds were failing to convert an asset. I still don't know why, but as a result I've realized my changes weren't getting built, hence that fullscreen never seemed to work. I need to look into this issue, as it appears that's my real problem.
What's interesting is the same asset (a png) builds fine for html5... very odd, but I'll see what I can find out. hopefully the asset just needs reexported or something... I'll close this as it sounds like the evidence that I had that was good says there's no issue.
For html5 images are not built and the png files are just loaded by the browser. It's probably something fancy like a 32bit color channel png - load it in something like irfanview and save it as a non-fancy png.
Apparently I'd updated my tasks in vscode to point to a different Kha than the one I'd wanted it to. I reverted it so it used my VSCode settings and now I'm back in shape. lesson learned, if you steal build settings, delete your build folder when you test them.
That's why the issue template asks for the build output by the way - if you had filled that in I would have caught the problem right away.
Apologies, I was a bit confused, but I understand it better now. Btw, Windows worked as expected with both methods (as you would have guessed), even in my larger project.
All righty!
Describe the bug I recieve
Uncaught TypeError: fullscreen error
when i attempt to set the window to fullscreen. The app does not break or really show any sign of response other than this debug log. I've put the code into the init project to show it doesn't seem to be dependant on outside libraries interfering in some way.To Reproduce Steps to reproduce the behavior:
Expected behavior I'd expect the game to engage into full screen
Screenshots![image](https://user-images.githubusercontent.com/3956893/142915940-c17fcacb-2c20-412f-ba25-e8d240814d0f.png)
Execution Environment:
Additional context Neither the
System.Start
norWindow.get(0).mode = WindowMode.Fullscreen
methods seem to work, and the error only seems to come from the Window method.