Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flags for SetVideoMode should be uint32 instead of int. #6

Open
manveru opened this issue May 25, 2010 · 6 comments
Open

Flags for SetVideoMode should be uint32 instead of int. #6

manveru opened this issue May 25, 2010 · 6 comments

Comments

@manveru
Copy link
Contributor

manveru commented May 25, 2010

A couple of the automatically generated constants have int type, this causes issues because some of them overflow int when combined and SetVideoMode only takes uint32.
I suggest we identify all possible flags for that function and type them properly.

@manveru
Copy link
Contributor Author

manveru commented May 26, 2010

These seem to be the flags accepted by SetVideoMode:

ANYFORMAT    uint32 = 0x10000000
HWPALETTE    uint32 = 0x20000000
DOUBLEBUF    uint32 = 0x40000000
FULLSCREEN   uint32 = 0x80000000
OPENGL       uint32 = 0x00000002
OPENGLBLIT   uint32 = 0x0000000a
RESIZABLE    uint32 = 0x00000010
NOFRAME      uint32 = 0x00000020

@manveru
Copy link
Contributor Author

manveru commented May 26, 2010

For some reason I get segfaults when using the RESIZABLE flag, still trying to find out what's going wrong.

@banthar
Copy link
Owner

banthar commented May 26, 2010

I'm not getting any errors, can you share your source?

@manveru
Copy link
Contributor Author

manveru commented May 26, 2010

@banthar
Copy link
Owner

banthar commented May 26, 2010

you are missing sdl.OPENGL flag

http://gist.github.com/414478

@manveru
Copy link
Contributor Author

manveru commented May 26, 2010

I get a segfault with and without that flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants