SyntaxBomb - Indie Coders

Languages & Coding => BlitzMax / BlitzMax NG => Topic started by: Ashmoor on July 05, 2020, 11:21:34 AM

Title: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Ashmoor on July 05, 2020, 11:21:34 AM
The code below works perfectly fine on windows but does not work on macOS Catalina. Switching to fullscreen triggers some issue that leads to drawing it as in the image linked below code. Any idea how to fix this?

Using SetViewport leads to even weirder issues, both in windowed mode and full screen. It either draws just a part of the bgImg in the bottom left corner of the screen or the top part of bgImg at the top of the screen.

However, if I set a different width and height for the graphics call and leave everything else as is (with or without viewport), it works. For example 1110x619 works fine but 800x450 does not. It is not a matter of aspect ratio (does not matter if it's 16/9 or 4/3 or whatever).

Code: BlitzMax
  1.  
  2. Framework SDL.gl2sdlmax2d
  3. Import brl.jpgloader
  4.  
  5. Global fullscreen%=0
  6.  
  7.  
  8. Graphics 800,600,fullscreen
  9. SetBlend(ALPHABLEND)
  10.  
  11. Global bgImg:TImage=LoadImage("graphics/p1_wallpaper.jpg")
  12. 'Global bgImg:TImage=LoadImage("graphics/bgimg.jpg")
  13. If Not bgImg Then RuntimeError("cant load bgImg")
  14.  
  15. 'SetViewport(0,0,1920,1080)
  16. SetVirtualResolution(1920,1080)
  17.  
  18.  
  19.  
  20. Repeat
  21.  
  22.         Cls
  23.         DrawImage (bgImg,0,0)
  24.         DrawText(MouseX()+","+MouseY(),10,10)
  25.         Flip
  26.        
  27.         If KeyHit (KEY_ESCAPE) Or AppTerminate() Then End
  28.         If KeyHit(KEY_1) Then PrintViewPort()
  29.         If KeyHit(KEY_2)Then printcoords()
  30.         If KeyHit (KEY_3) Then
  31.                 fullscreen=Not(fullscreen)
  32.                 EndGraphics()
  33.                 ReInitGraphics()
  34.         EndIf
  35.                
  36. Forever
  37.  
  38. Function ReInitGraphics()
  39.         Graphics 800,600,fullscreen
  40.         SetVirtualResolution(1920,1080)
  41. EndFunction
  42.  
  43.  
  44. Function PrintViewPort()
  45.         Local xo%, yo%, vw%,vh%
  46.  
  47.         GetViewport(xo,yo,vw,vh)
  48.         Print "viewport:"+xo+","+yo+","+vw+","+vh
  49.         Local x#,y#
  50.         GetOrigin( x,y )
  51.         Print "origin:"+x+","+y
  52. EndFunction
  53.  
  54. Function PrintCoords()
  55.         Print ("x:"+MouseX()+"y:"+MouseY())
  56.         Print("vx:"+VirtualMouseX()+" vy:"+VirtualMouseY())
  57. EndFunction
  58.  
  59.  

Image: https://drive.google.com/file/d/192Kur5i7nMhaIa8yTOcYBdyN0zmcGuBi/view?usp=sharing
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Lavalamp on August 07, 2020, 09:37:47 PM
I've raised this several times now. :( Additionally if you enable HiDPI you cant create 64-32 bit binary only 32.
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Ashmoor on August 08, 2020, 05:29:30 AM
What is HiDPI and how do you enable it?

I am still having issues with fullscreen mode. CMD+Tab does not work, do you guys have any idea how to fix that?

Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Derron on August 08, 2020, 07:12:51 AM
Did you raise an issue for it?

I at least mentioned this thread in the issues discord channel for now.


Bye
Ron
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: iWasAdam on August 08, 2020, 07:43:57 AM
Checking over the code on a mac I can confirm the errors both with fullscreen and the cmd+tab

It's not and issue with NG its an issue with the code itself. MacOS needs to be set up in a different way to windows. I can't elaborate more as I am having the same issues. but I will come up with a solution for you :)
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Derron on August 08, 2020, 08:55:56 AM
It happen with SDL and non-SDL ?

Code: BlitzMax
  1. SuperStrict
  2. Framework Brl.StandardIO
  3. 'old releases
  4. 'Import Brl.Random
  5. 'new modules
  6. Import Brl.RandomDefault
  7.  
  8. 'NON-SDL
  9. 'Import Brl.GLMax2D
  10. 'SDL
  11. 'Import SDL.GLSDLMax2D
  12. 'or SDL GL2
  13. Import SDL.GL2SDLMax2D
  14.  
  15. Graphics(800, 600)
  16. SetBlend AlphaBlend
  17. SetColor 255,255,255
  18. SetClsColor 40, 80, 160
  19. While Not KeyDown(KEY_ESCAPE)    
  20.     Cls
  21.    
  22.     SeedRnd(MilliSecs() / 1000)
  23.     For Local i :Int = 0 To 100
  24.         SetColor Rand(0,255), Rand(0,255), Rand(0,255)
  25.         DrawText("Hey", Rand(0, GraphicsWidth()-50), Rand(0, GraphicsHeight()-20))
  26.     Next
  27.    
  28.     Flip
  29. Wend
  30.  
  31. End
  32.  

?
(add your virtual resolution commands on your own)
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: iWasAdam on August 08, 2020, 10:41:37 AM
@derron- the issue is to do with native Commands and full screen. To do it properly, you have to call the correct commands and have the app core set up in a certain way. Using setgraphics is not the way to do it - especially when switching from windowed mode...

I’m looking into how get the correct result
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Derron on August 08, 2020, 11:40:30 AM
SetGraphics should be working ...

SDL provides its own "set fullscreen" thing ...

TSDLWindow.SetFullScreen:
Code: [Select]
Rem
bbdoc: Sets the window's fullscreen state.
returns: 0 on success or a negative error code on failure.
about: @flags may be SDL_WINDOW_FULLSCREEN, for "real" fullscreen with a videomode change; SDL_WINDOW_FULLSCREEN_DESKTOP
for "fake" fullscreen that takes the size of the desktop; and 0 for windowed mode.
End Rem
Method SetFullScreen:Int(flags:UInt)
Return SDL_SetWindowFullscreen(windowPtr, flags)
End Method


I assume it needs a bit more to do "borderless windowed fullscreen" (app without decorations in the size of the "display" but not true full screen).


Code: BlitzMax
  1.  
  2. Graphics(800, 600)
  3. SetBlend AlphaBlend
  4. SetColor 255,255,255
  5. While Not KeyDown(KEY_ESCAPE)    
  6.     Cls
  7.  
  8.         If KeyHit(KEY_SPACE)
  9.                 Local window:TSDLWindow = TSDLGLContext.GetCurrentWindow()
  10.                 If Not window
  11.                         Print "cannot find TSDLWindow - fullscreen switch not possible"
  12.                 Else
  13.                         If Not doFullScreen
  14.                                 doFullscreen = True
  15.  
  16.                                 Local display:TSDLDisplay = window.GetDisplay()
  17.                                 Local displayMode:TSDLDisplayMode = display.GetCurrentDisplayMode()
  18.                                 Print "full active display size: " + displayMode.Width() + "x" + displayMode.Height()
  19.                                 window.SetBordered(0) 'disable borders
  20.                                 window.SetFullScreen(SDL_WINDOW_FULLSCREEN_DESKTOP)
  21.                                 Graphics(displayMode.Width(), displayMode.Height())
  22.                         Else
  23.                                 doFullScreen = False
  24.                                
  25.                                 Print "back to windowed mode"
  26.                                
  27.                                 window.SetBordered(1) 'enable borders
  28.                                 window.SetFullScreen(0)
  29.                                 Graphics(800, 600)
  30.                         EndIf
  31.                 EndIf
  32.         EndIf
  33.    
  34.         SeedRnd(MilliSecs() / 1000)
  35.         For Local i :Int = 0 To 100
  36.                 SetColor Rand(0,255), Rand(0,255), Rand(0,255)
  37.                 DrawText("Hey", Rand(0, GraphicsWidth()-50), Rand(0, GraphicsHeight()-20))
  38.         Next
  39.    
  40.     Flip
  41. Wend
  42.  
  43. End
  44.  

you might be able to remove the borders when appending the flag to the graphics command:
Graphics(800, 600, 0,0, SDL_WINDOW_BORDERLESS)

Here on linux it does not remove the borders - so I am not sure about it.


bye
Ron
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Derron on August 08, 2020, 11:58:25 AM
Another thing to note:

When using "SDL" the window is created using "sdl.mod/sdlgraphics.mod/sdlgraphics.bmx"

In there is the method:
Code: [Select]
Method SDLGraphicsCreateGraphics:TGraphicsContext(width:Int,height:Int,depth:Int,hertz:Int,flags:Int,x:Int,y:Int)
...


Else

If depth Then
windowFlags :| SDL_WINDOW_FULLSCREEN
' mode = MODE_DISPLAY
Else
If flags & $80000000 Then
windowFlags :| SDL_WINDOW_FULLSCREEN_DESKTOP
End If
' mode = MODE_WINDOW
...

Have seen this $80000000 ?? This should correspond to the "SDL_FULLSCREEN" flag ... so when passing this but not providing a "depth" in the graphics command, you should get a desktop sized fullscreen window.

If you try to add this to the initial "graphics()" command in my code you will see an application which occupies your whole desktop - but only renders in the bottom left area in the size of 800x600.

this somehow looks similar to what the OP/Ashmoor experienced.



Edit: With Ashmoor's code get different results on my linux box:
- going into fullscreen and I only see a big big part of a number (so scaled up by some hundred percents)
- going out of fullscreen: works
- going again into fullscreen: works (it now properly scales the bg image for me)

Ok, so I copy pasted the stuff in "Key_3" ... so it automatically goes "into, out, into" ... and it is still borked up there. I added delays, added "cls; flip" lines over and over... but it was not "automatizable". Surely this is not just a bug for "OS X" but more a generic issue with Max2D ? (maybe not on windows though...)

hmmm .. played a bit more with it, and now "windowed -> fullscreen" works for me (linux, only brl.glmax2d, not sdl.glmax2d)

bye
Ron
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Ashmoor on August 08, 2020, 06:36:52 PM
Code: BlitzMax
  1. Import Brl.RandomDefault

I don't have this, was there a new version released? I used BRL.Random

Below are some screenshots gl2SdlMax2d looks exactly like non sdl.

"SDL provides its own "set fullscreen" thing ..."

This looks nice but dock covers the app both in SDL_WINDOW_FULLSCREEN_DESKTOP and SDL_WINDOW_FULLSCREEN

The following code switches to full screen but the resolution is wild: 3070x1438

Code: BlitzMax
  1. Framework SDL.gl2sdlmax2d
  2. Import brl.Random
  3.  
  4. Global doFullScreen
  5.  
  6. Graphics(800, 600)
  7.  
  8. Global vrWidth=1920
  9. Global vrHeight=1080
  10.  
  11. SetVirtualResolution(vrWidth, vrHeight)
  12. 'SetViewport(0,0,vrWidth,vrHeight)
  13. 'SetViewport(0,0,vrWidth*2,vrHeight*2)
  14.  
  15. SetBlend AlphaBlend
  16. SetColor 255,255,255
  17. While Not KeyDown(KEY_ESCAPE)    
  18.     Cls
  19.  
  20.         If KeyHit(KEY_SPACE)
  21.                 Local window:TSDLWindow = TSDLGLContext.GetCurrentWindow()
  22.                 If Not window
  23.                         Print "cannot find TSDLWindow - fullscreen switch not possible"
  24.                 Else
  25.                         If Not doFullScreen
  26.                                 doFullscreen = True
  27.  
  28.                                 Local display:TSDLDisplay = window.GetDisplay()
  29.                                 Local displayMode:TSDLDisplayMode = display.GetCurrentDisplayMode()
  30.                                 Print "full active display size: " + displayMode.Width() + "x" + displayMode.Height()
  31.                                 'window.SetBordered(0) 'disable borders
  32.                                 window.SetFullScreen(SDL_WINDOW_FULLSCREEN_DESKTOP)
  33.                                 'Graphics(displayMode.Width(), displayMode.Height())
  34.                         Else
  35.                                 doFullScreen = False
  36.                                
  37.                                 Print "back to windowed mode"
  38.                                
  39.                                 window.SetBordered(1) 'enable borders
  40.                                 window.SetFullScreen(0)
  41.                                 'Graphics(800, 600)
  42.                         EndIf
  43.                 EndIf
  44.         EndIf
  45.    
  46.         SeedRnd(MilliSecs() / 1000)
  47.         For Local i :Int = 0 To 100
  48.                 SetColor Rand(0,255), Rand(0,255), Rand(0,255)
  49.                 DrawText("Hey", Rand(0, vrWidth-50), Rand(0, vrHeight-20))
  50.         Next
  51.                
  52.                 SetScale(2.0,2.0)
  53.                 DrawText(VirtualMouseX()+","+VirtualMouseY(),10,10)
  54.                 SetScale(1.0,1.0)
  55.                
  56.     Flip
  57. Wend
  58.  
  59. End
  60.  

Thing is, I don't really care about using SDL and as long as the app can run, but with BRL the y coordinates are flipped in full screen. MacOS is wild.

Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: iWasAdam on August 09, 2020, 11:41:21 AM
@Ashmoor
The macOS itself handles fullscreen and zoom and maximize. And they are all slightly different and they require menu system as well!

Proper fullscreen (which is what you want) can be seen by the third green traffic light and a window - if this is NOT there - then whatever fullscreen you think is right - it isn't <- read and read that again
There used to be a fullscreen option in the app menu under window. but this has been removed. BEWARE to use fullscreen, maximize, zoom, etc you WILL have to have a windows menu for your app!

Fullscreen (ON A MAC) from a window is done by pressing the green button or ctrl+cmd+f <- pressing ctrl+cmd+f again will restore the window. You will also see the window animate from being a window to fullscreen. Cmd+tab will be happy etc.

DO NOT ASSUME ANYTHING ON A MAC.
Do not think using sdl or other frameworks will work correctly - they might, they will more than likely need much more setup and OS specific code to work correct.

Although you can use internal language/sdl commands to force fullscreen on a mac - IT"S NOT PROPER FULLSCREEN. It's a kludge that will eventually give you HUGE headaches, as nothing will quite be right - your users will know instantly - BEWARE!!!!!!!!!!!

I am tracking down some for of code answer for you - but it's not a simple thing... It's a framework. Unfortunately you will HAVE to adopt something similar which will mean recoding your main program loops, etc.

Porting code from windows to mac is not as easy as clicking build - unless you are using something very highlevel like unity - it will take care of the nasty internal framework code for you!

I'm sorry this is not an easy answer...  :'(
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Ashmoor on August 11, 2020, 12:54:35 PM
I have managed to get some code to work and fit my needs. Here it is:

Code: BlitzMax
  1.  
  2. Framework SDL.gl2sdlmax2d
  3. Import brl.jpgloader
  4. Import brl.Random
  5. Import brl.StandardIO
  6.  
  7. Global isFullScreen
  8.  
  9. Global bgImg:TImage=LoadImage("graphics/screen_tester1.jpg")
  10. If Not bgImg Then RuntimeError("cant load bgImg")
  11.  
  12.  
  13. Global vrWidth=1920
  14. Global vrHeight=1080
  15.  
  16. Global wWidth=960
  17. Global wHeight=600
  18.  
  19. Global fsWidth=DesktopWidth()
  20. Global fsHeight=DesktopHeight()
  21.  
  22. Graphics (wWidth,wHeight)
  23. SetBlend AlphaBlend
  24. SetVirtualResolution(vrWidth, vrHeight)
  25.  
  26.  
  27. Repeat
  28.  
  29.         Cls
  30.         If KeyHit (KEY_SPACE) Then
  31.                 EndGraphics()
  32.                
  33.                 If Not isFullScreen Then
  34.                         'switch to full screen
  35.                         isFullScreen=True
  36.                        
  37.                         Graphics (fsWidth, fsHeight)
  38.                         SetVirtualResolution(1920,1080)
  39.                        
  40.                         Local window:TSDLWindow = TSDLGLContext.GetCurrentWindow()
  41.                         window.SetFullScreen(SDL_WINDOW_FULLSCREEN_DESKTOP)
  42.                        
  43.                 Else
  44.                         'switch to windowed
  45.                         isFullScreen=False
  46.                          
  47.                         Graphics (wWidth,wHeight)
  48.                         SetVirtualResolution(1920,1080)
  49.                         Local window:TSDLWindow = TSDLGLContext.GetCurrentWindow()
  50.                         window.SetFullScreen(0)
  51.                
  52.                 EndIf
  53.                
  54.        
  55.         EndIf
  56.  
  57. 'draw something so we can check
  58.                 DrawImage(bgImg,0,0)
  59.                
  60.         SeedRnd(MilliSecs() / 1000)
  61.         For Local i :Int = 0 To 100
  62.                 SetColor Rand(0,255), Rand(0,255), Rand(0,255)
  63.                 DrawText("Hey", Rand(0, vrWidth-50), Rand(0, vrHeight-20))
  64.         Next
  65.                 SetColor (255,255,255)
  66.                
  67.                 SetScale(2.0,2.0)
  68.                 DrawText("rm:"+MouseX()+","+MouseY(),10,30)
  69.                 DrawText(VirtualMouseX()+","+VirtualMouseY(),10,10)
  70.                 SetScale(1.0,1.0)
  71.                
  72.                 Local x:Float, y:Float
  73.                 x=VirtualMouseX(); y=VirtualMouseY()
  74.                
  75.                 DrawRect(x-5,y-5,10,10)
  76.  
  77.         Flip()
  78.  
  79. 'end condition
  80.         If KeyHit(KEY_ESCAPE) Or AppTerminate() Then End
  81. Forever
  82.  
  83.  

For some reason if I switch to full screen using the code above, calling osascript no longer works. Does anyone have any idea why or how to fix it?


Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: iWasAdam on August 12, 2020, 06:30:57 AM
sooo. You hacked a fullscreen - that's not proper fullscreen. \o/
And now you want to install some virus or do some other 'nasty' scriptkiddie stuff too? And MacOS wont let you...
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Ashmoor on August 17, 2020, 04:36:29 PM
Why is this not "proper" full screen? Can you please explain what is expected of a proper full screen?
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: iWasAdam on August 18, 2020, 06:47:26 AM
first 2 questions for you:
1. do you use a mac?
2. did you compile the code on a mac?

ok. here's a detailed version to read:
https://www.techjunkie.com/leave-full-screen-os-x/ (https://www.techjunkie.com/leave-full-screen-os-x/)

next
A mac is NOT windows. they use completely different commands and have different ways of doing things.

what is fullscreen on a mac?
- Is when a window covers the entire screen including the menu and taskbar.
- Putting the mouse at the top of the screen in this mode will show the menu and the title bar and allow you to switch mode back to window or OTHER screens - the mac can have multiple screens even on a mac with one monitor!
- a mac app which has TRUE fullscreen ability (see above) has a green top left button. this can be pressed to go into fullscreen
- ctrl+cmd+f will switch from window to fullscreen. the window will usually animate when it does this.
- cmd+tab will also function normally
- the app will  'window' as a menu item with sometimes minimise, zoom, fullscreen added.

anything else is NOT considered by apple or users as fullscreen - it MUST behave the way it should and use the correct icons, etc


Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Ashmoor on August 18, 2020, 09:47:35 AM
Yes, I do use a mac. I have a 2014 macbook pro running MacOS Catalina and yes, I did compile the game on the mac.

"A mac is NOT windows. they use completely different commands and have different ways of doing things."

Of course. I use different functions for the system tasks.

"- Is when a window covers the entire screen including the menu and taskbar." - Check

"- Putting the mouse at the top of the screen in this mode will show the menu and the title bar and allow you to switch mode back to window or OTHER screens - the mac can have multiple screens even on a mac with one monitor!"

I don't know what other screens is. My game has no menu bar, maybe one has to exist in order to display it when moving the mouse to the top of the screen? I have set hot corners in mission control so if I go to bottom right corner with the mouse and my game zooms out to a small rectangle in "spaces" bar at the top of the screen. This behavior is similar to Fishdom, a popular m3 game I got from the app store. If this works for them, should work for me as well. I don't have much experience as a mac user so I can't tell if other games behave in the same way and I'm not saying it's "proper" but it works.

Putting the mouse at the bottom of the screen shows the dock.

"- a mac app which has TRUE fullscreen ability (see above) has a green top left button. this can be pressed to go into fullscreen"
Hmm, this would be nice to have, I don't know how to set it. However, maximizing in this way would mess up the virtual resolution, I have to look further into that. I have not seen many games that allow window resize on the fly.

"- ctrl+cmd+f will switch from window to fullscreen. the window will usually animate when it does this."

This can be implemented but the window will not animate because of the "Graphics" call. I could do a smoother transition like having the window animate to window/full screen size then resetting "graphics" and virtual resolution.

"- cmd+tab will also function normally"

This does function normally.

"- the app will  'window' as a menu item with sometimes minimise, zoom, fullscreen added."

I don't understand what this is. When I minimize the game window, it zooms to dock.




Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: iWasAdam on August 18, 2020, 11:16:15 AM
menu bar / app bar - come on you know what I mean!

I only asked about you having a mac, as you seem not to have observed how the apps work!

The key here is it need to LOOK and BEHAVE EXACTLY as a mac app

resolutions are your task to figure out what is going on. but for it to be a true app - it MUST work like every other 'proper' app


To clarify - use safari. click to green traffic light icon - watch the screen - use you mouse to go to the top of the screen - the app/menu bar will appear - you can now click the green button again...
click and hold the mouse/trackpad and a menu will pop up with fellscreen/left and right screen docking options - does yours?
ctrl+cmd+f will switch from window to fullscreen - DO IT....
Check the app menu for the 'window' item. click it you will find zoom and minimize. does your app have the windows entry with the fullscreen option?

does your app follow these basic app specs shown above? if the answer is no. then your app is NOT a true mac app. It doesn't matter if you have programmed the qwfhn keys to make it DO fullscreen - it's NOT.

It really couldn't be simpler :)

Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: GfK on August 18, 2020, 11:33:24 AM
Looking at the first post and ignoring all the stuff between because I CBA to read it all, I had a similar (maybe exact) issue with native BlitzMax years ago.  The fix back then, was to always force-start your game in windowed mode (I used a 1x1 window so you'd barely notice it happening - the window size didn't matter).  After that you can immediately switch to the user-selected mode, be it an actual window, or fullscreen.  Subsequent switches between windowed/fullscreen then worked fine.

So:-

1. Launch game in a 1x1 window.
2. Load your game preferences file (including the user's screen mode preference).
3. Switch to that screen mode.
4. Do all the other game-launchy stuff, splash screens etc.

IIRC Grey Alien also had the same problem and solution.

Whether this still works in BlitzMax NG *and* more modern Macs, is for you to find out.
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Ashmoor on August 18, 2020, 01:19:46 PM
@iWasAdam

"menu bar / app bar - come on you know what I mean!"

I'm sorry, I am really new to the MacOS. I have maybe 2 months of usage. I am guessing the app bar is the top bar, right?

"The key here is it need to LOOK and BEHAVE EXACTLY as a mac app"

Even if other games do not look or behave like regular apps? I will download more games and will see how they handle stuff. Can you recommend any? Are you a long time mac user? I appreciate your input.

"click and hold the mouse/trackpad and a menu will pop up with fellscreen/left and right screen docking options - does yours?"

I don't see how this would work for a game, it does not scale properly to dock it on a side. Do other games have this?

"Check the app menu for the 'window' item. click it you will find zoom and minimize. does your app have the windows entry with the fullscreen option?"

Ok, I see that. My app does not have the "window", will investigate further.

@GFK I'll look into that. Thanks.




Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: iWasAdam on August 18, 2020, 02:19:09 PM
@Ashmoor
I do have a solution, but it is not straightforward and requires modifying and adding commands. It was something I did long before NG and I was very disappointed when you mentioned the issues initially as I would have thought that these issues would have been found and fixed.

Monkey2 does not have these issues as Mark wrote some very in-depth SDL code to handle it all correctly.

This led me down a code rabbit hole and also needed some in-depth objectiveC to make it fully work.
But...
It currently only works if the windows are initially set up in a very specific way. I have been reporting my finding back to Derron who is reporting back to Brucey about this.

I don't run many commercial games on the mac (i usually use a console for gaming). Xerras recent boulderdash clone does have this function perfectly:https://xerra.itch.io/Boulderdash (https://xerra.itch.io/Boulderdash)
A few games I have looked at have variying amounts of ability
- Fidel Dungeon Rescue - looks fine and responds to ctrl+cmd+f but when you fullscreen it takes over everything apart from cmd+tab - there is no way to exit, etc - so it's very poorly programmed (for the mac)
- voice basterds is fullscreen only - with no option to turn it off
- kingdom and castles - has the menu and goes into fullscreen and back again but lacks the system ctrl+cmd+f to do it - it must be done by clicking the icons
- all my games are resolution and fullscreen compatible - give bloom a go https://adamstrange.itch.io/bloom (https://adamstrange.itch.io/bloom)
- quake does not have 'true' fullscreen mode enabled
- gzdoom had fullscreen - but it is not 'true' as it only allows it ingame and not via system commands

So from the above you can gather that there are many different approaches - but you should start and work from the 'true' fullscreen :)

Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Ashmoor on August 19, 2020, 08:55:35 AM
"It currently only works if the windows are initially set up in a very specific way. I have been reporting my finding back to Derron who is reporting back to Brucey about this."

Thanks, it would be nice if things get fixed and noobs like me can use them.


"Xerras recent boulderdash clone"

Yes, I tested that as well and messaged him but he uses Gamemaker studio 2.


"So from the above you can gather that there are many different approaches - but you should start and work from the 'true' fullscreen"

Yes, that's what I thought. The same is true for windows.
Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: Ashmoor on August 20, 2020, 01:20:29 PM
I gave bloom a try and it does not work properly :( see attached screenshot. Sometimes it starts well in windowed mode but everytime I switch to full screen it gets wildly offset like you can see in the attached image. Looks like a retina display issue.

Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: iWasAdam on August 20, 2020, 02:21:10 PM
nope - it's working completely normal - it has a defined aspect ration that is always the same regardless of what resolution the window is - so you might get black bars at the top if its a tall window and bars at the side if it is a wide window :)

Vivamortis uses a different approach: the window is a taxture that is always stretched to fit the window. it's the opposite of Bloom.

But both are true fullscreen apps as they have the correct icons/menus and keyboard operations :)

Title: Re: BlitzmaxNG fullscreen virtual resolution issues macOS Catalina
Post by: iWasAdam on August 21, 2020, 02:26:43 PM
I've been updating NG with Bruceys event and sdl changes and can confirm that true fullscreen on MacOS is available through sdl :)
SimplePortal 2.3.6 © 2008-2014, SimplePortal