Linux Ubuntu-Linux Lite and full screen mode

Report any Hollywood bugs here
Post Reply
User avatar
Juan Carlos
Posts: 887
Joined: Mon Sep 06, 2010 1:02 pm

Linux Ubuntu-Linux Lite and full screen mode

Post 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.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Linux Ubuntu-Linux Lite and full screen mode

Post 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...
User avatar
Juan Carlos
Posts: 887
Joined: Mon Sep 06, 2010 1:02 pm

Re: Linux Ubuntu-Linux Lite and full screen mode

Post 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.
User avatar
Juan Carlos
Posts: 887
Joined: Mon Sep 06, 2010 1:02 pm

Re: Linux Ubuntu-Linux Lite and full screen mode

Post 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.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Linux Ubuntu-Linux Lite and full screen mode

Post by airsoftsoftwair »

Please provide a MCVE that I can test on Ubuntu and I'll check.
User avatar
Juan Carlos
Posts: 887
Joined: Mon Sep 06, 2010 1:02 pm

Re: Linux Ubuntu-Linux Lite and full screen mode

Post by Juan Carlos »

With the game is more easy and you can play to blackjack made with your language too. :lol:
User avatar
Juan Carlos
Posts: 887
Joined: Mon Sep 06, 2010 1:02 pm

Re: Linux Ubuntu-Linux Lite and full screen mode

Post 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.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Linux Ubuntu-Linux Lite and full screen mode

Post 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?
Post Reply