Hello! Has anybody faced such a bug using love.graphics.toggleFullscreen(), or it's just my machine getting crazy:
I start the game in a fullscreen mode (defined in conf.lua), then in the game I go to the 'Options' menu, push 'Off' button, it works, but when I push 'On' with the same action love.graphics.toggleFullscreen(), it doesn't switch to the initial fullscreen mode. I checked, it returns true, but the result is wrong. May be some of you knows what is the reason?
I run WinXP x64.
Regards,
Roman.
toggleFullscreen() works weird
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- rhezalouis
- Party member
- Posts: 100
- Joined: Mon Dec 07, 2009 10:27 am
- Location: Indonesia
- Contact:
[Response]Hollaaa Roman
Could you provide us your code please.
Aargh, I am wasting my posts! My citizenshiiiip...
Re: [Response]Hollaaa Roman
Ok, though I think it won't make things clearer. This chunk is sitiuated in :mousepressed() section:rhezalouis wrote:Could you provide us your code please.
Code: Select all
for n,b in pairs(self.button) do
if b:mousepressed(x,y,button) then
if n == "on" then
love.graphics.toggleFullscreen()
elseif n == "off" then
love.graphics.toggleFullscreen()
elseif n == "back" then
state = Menu.create()
end
end
end
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: toggleFullscreen() works weird
Stupid question: are you sure that the code is executed?
Maybe the problem is on the if-elseif-elseif. Have you tried putting prints there to be sure that the toggleFullScreen method is called?
Maybe the problem is on the if-elseif-elseif. Have you tried putting prints there to be sure that the toggleFullScreen method is called?
When I write def I mean function.
- rhezalouis
- Party member
- Posts: 100
- Joined: Mon Dec 07, 2009 10:27 am
- Location: Indonesia
- Contact:
[Hyaa]Sorry
Ah, sorry, the problem had been discussed bizzarely here.
You should use love.graphics.setMode() instead [i.e. Robin's hard-core way].
Here's an example: >the left-mouse-click triggers the not-working toggleFullscreen()
>the right-mouse-click triggers the setMode()
Have fun.
You should use love.graphics.setMode() instead [i.e. Robin's hard-core way].
Here's an example: >the left-mouse-click triggers the not-working toggleFullscreen()
>the right-mouse-click triggers the setMode()
Have fun.
Last edited by rhezalouis on Mon Aug 02, 2010 9:57 am, edited 2 times in total.
Aargh, I am wasting my posts! My citizenshiiiip...
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: toggleFullscreen() works weird
I have the same problem on my laptop. Going fullscreen works fine, but toggling it off doesn't.
Re: toggleFullscreen() works weird
Thank you guys. I'll try to use setMode().
Who is online
Users browsing this forum: Google [Bot] and 207 guests