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

Added displayList for windows #33

Merged
merged 1 commit into from
Nov 24, 2011

Conversation

gameoverhack
Copy link
Contributor

Adds display list functionality for windows (ie., getDisplays now works).

On another note:

Noticed setWindowPosition is not working (at least on windows) -> does it work correctly on linux and mac?

Will look into it if it works elsewhere...

underdoeg added a commit that referenced this pull request Nov 24, 2011
Added displayList for windows
(thx gameoverhack)
@underdoeg underdoeg merged commit d71dc90 into underdoeg:master Nov 24, 2011
@underdoeg
Copy link
Owner

Hey thanks for your contribution. Looking good!
Yes, setWindowPosition works on linux and mac. But I had to add it to ghost myself. So win is probably not ready yet. Does setting an initial window position work though?

@underdoeg
Copy link
Owner

just checked the ghost code and yes, it is not in yet. https://github.com/underdoeg/ghost/blob/master/intern/GHOST_WindowWin32.cpp#L1360

I don't have acces to windows right now, but if you need it and want to give it a try, I think the following code will do the trick. (untested though)

GHOST_TSuccess GHOST_WindowWin32::setWindowPosition(GHOST_TUns32 x, GHOST_TUns32 y)
{
GHOST_Rect wBnds;
getWindowBounds(wBnds);
int cx = wBnds.getWidth();
int cy = wBnds.getHeight();
return = ::SetWindowPos(m_hWnd, HWND_TOP, x, y, cx, cy, SWP_NOMOVE | SWP_NOZORDER) ?
GHOST_kSuccess : GHOST_kFailure;
}

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

Successfully merging this pull request may close these issues.

2 participants