Strange limit to mouse.getX-getY
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Strange limit to mouse.getX-getY
What if you set the window size in love.conf?
Re: Strange limit to mouse.getX-getY
vrld wrote:What if you set the window size in love.conf?
That worked. I cannot use love.graphics.setMode, because the problem appears again, but at least I can start the game in the resolution I want.
Thanks.
Re: Strange limit to mouse.getX-getY
Its not, I can confirm this with my setup (linux/love 0.7.0).gerard wrote:As it seems to be a problem with my installation of love, I will try to reinstall it to see if that eliminates the problem.
love always sets the 800x600 mode first, and then changes it with another setMode:
Code: Select all
$ ltrace love . 2>&1 |grep VideoMode
SDL_VideoModeOK(800, 600, 32, 2, 0xb76d41c0) = 32
SDL_SetVideoMode(800, 600, 32, 2, 0xbfbe12c0) = 0x8e839d0
SDL_SetVideoMode(1280, 720, 32, 2, 0xb76db8a0) = 0x8e839d0
Now that I tried it a few more times, the original code also works OK (with fullscreen=false). So it looks like the underlying SDL problem. Is it possible that calling SDL_SetVideoMode more than once is not defined for SDL?
SDL docs says:
Code: Select all
SDL_RESIZABLE
Create a resizable window. When the window is resized by the user a SDL_VIDEORESIZE event is generated and SDL_SetVideoMode can be called again with the new size.
Check this out: http://www.libsdl.org/docs/html/sdlresizeevent.html
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Strange limit to mouse.getX-getY
The creation of two windows is simply because it is told to do so, if you want to set the resolution of the first window it creates use the config file.
Re: Strange limit to mouse.getX-getY
Resizable simply means that the user is able to change the window size. If that happens, the SDL_ResizeEvent tells how big the new window is, so you can draw accordingly.miko wrote:So I guess that you need to pass SDL_RESIZABLE in the first call if you want to resize the window later with another SetVideoMode.
SDL_SetVideoMode is for when you - the programmer - want to change the window size.
Anyway, this bug is (hopefully) fixed in the next release.
Who is online
Users browsing this forum: Google [Bot] and 5 guests