Page 1 of 1

Linux Ubuntu-Linux Lite and full screen mode

Posted: Sun Apr 24, 2022 9:00 pm
by Juan Carlos
As curiosity under Linux Ubuntu-Linux Lite of 64 bits the instruction ChangeDisplayMode with its three parameters
ChangeDisplayMode(#DISPMODE_FULLSCREEN)
ChangeDisplayMode(#DISPMODE_FULLSCREENSCALE, {SmoothScale=True})
ChangeDisplayMode(#DISPMODE_MODESWITCH, {SmoothScale=True})
It has a strange visual effect with texts and graphics, I could see this visual bug with Hollywood 9.0 and now with 9.1.
Thanks.

Re: Linux Ubuntu-Linux Lite and full screen mode

Posted: Fri Apr 29, 2022 11:30 pm
by airsoftsoftwair
What do you mean by "strange visual effect with texts and graphics"? When changing the monitor resolution it's not uncommon to temporarily get some garbage pixels...

Re: Linux Ubuntu-Linux Lite and full screen mode

Posted: Sat Apr 30, 2022 11:29 am
by Juan Carlos
You can see downloading my last game: https://www.morguesoft.eu/games/Blackjuan.tar.gz
Also in MorphOS with the PowerBooks G4 the result is worst crash the system but this will be problem with the MorphOS drivers, because with the MacMini the full mode works perfect.

Re: Linux Ubuntu-Linux Lite and full screen mode

Posted: Mon May 02, 2022 6:54 pm
by Juan Carlos
Well, I play the Windows game version under Wine and the visual problems don't show, it isn't problem from drivers or my computer, only the Linux executable.

Re: Linux Ubuntu-Linux Lite and full screen mode

Posted: Sun May 08, 2022 12:13 pm
by airsoftsoftwair
Please provide a MCVE that I can test on Ubuntu and I'll check.

Re: Linux Ubuntu-Linux Lite and full screen mode

Posted: Mon May 09, 2022 11:34 am
by Juan Carlos
With the game is more easy and you can play to blackjack made with your language too. :lol:

Re: Linux Ubuntu-Linux Lite and full screen mode

Posted: Mon May 09, 2022 1:07 pm
by Juan Carlos
Well working in an example like that:

Code: Select all

Global BotonPantalla=1
 
@DISPLAY {Title="Bug Linux", Width=640, Height=480, Borderless=False, NoClose=False,
	 KeepProportions=True, Sizeable=False, NoModeSwitch=True}

Function p_Teclado(msg)
  Switch(msg.action)
     Case "OnKeyDown":
	   If msg.key="1"
	          If BotonPantalla=1
			   BotonPantalla=0
			   ;ChangeDisplayMode(#DISPMODE_FULLSCREEN)
			   ;ChangeDisplayMode(#DISPMODE_FULLSCREENSCALE, {SmoothScale=True})
			   ChangeDisplayMode(#DISPMODE_MODESWITCH, {SmoothScale=True})

			   CLS()
			   SetFont(#SANS, 45)
                         SetFontColor(#WHITE)
			   SetFontStyle(#EDGE, #RED, 2)
			   SetFontStyle(#ANTIALIAS)
			   SetFontStyle(#BOLD)
			   TextOut(#CENTER, #CENTER, "FULL MODE")

		   ElseIf BotonPantalla=0
			   BotonPantalla=1
			   ChangeDisplayMode(#DISPMODE_WINDOWED)

			   CLS()
			   SetFont(#SANS, 45)
                         SetFontColor(#YELLOW)
			   SetFontStyle(#EDGE, #BLUE, 2)
			   SetFontStyle(#ANTIALIAS)
			   SetFontStyle(#BOLD)
			   TextOut(#CENTER, #CENTER, "WINDOW MODE")
		   EndIf
	  EndIf
  EndSwitch
EndFunction

Function p_Start()
  SetFont(#SANS, 45)
  SetFontColor(#YELLOW)
  SetFontStyle(#EDGE, #BLUE, 2)
  SetFontStyle(#ANTIALIAS)
  SetFontStyle(#BOLD)
  TextOut(#CENTER, #CENTER, "WINDOW MODE")

  InstallEventHandler({OnKeyDown=p_Teclado})
EndFunction

p_Start()
EscapeQuit(False) 
Repeat
  WaitEvent
Forever
It works without problems, change the mode perfect, the big problem is when you use this on the game, where the visual bugs appearing even the game enter in a freeze impossible kill the game with Control+C, ESC. But this game works fine under Windows, MorphOS and AmigaOS3.9.

Re: Linux Ubuntu-Linux Lite and full screen mode

Posted: Sat May 28, 2022 1:05 pm
by airsoftsoftwair
Tried your MCVE on Ubuntu 14.04 and 20.04. Works fine on both. Could be a problem with your Linux distribution or your drivers. Do other programs work correctly in full screen mode on that Linux?