mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 10:05:44 -04:00
Fix window creation func.
This commit is contained in:
parent
ebe28eea87
commit
7634039864
@ -49,14 +49,15 @@ void Window_Free(void) { }
|
||||
|
||||
static void DoCreateWindow(int width, int height) {
|
||||
r = qd.screenBits.bounds;
|
||||
Rect windR;
|
||||
/* TODO: Make less-crap method of getting center. */
|
||||
int centerX = r.right/2; int centerY = r.bottom/2;
|
||||
int ww = (width/2); int hh = (height/2);
|
||||
int ww = (SCREEN_WIDTH/2); int hh = (SCREEN_HEIGHT/2);
|
||||
SetRect(&bitmapScreen.bounds, 0, 0, width, height);
|
||||
|
||||
// TODO
|
||||
SetRect(&r, centerX-ww, centerY-hh, centerX+ww, centerY+hh);
|
||||
win = NewWindow(NULL, &r, "\pClassiCube", true, 0, (WindowPtr)-1, false, 0);
|
||||
SetRect(&windR, centerX-ww, centerY-hh, centerX+ww, centerY+hh);
|
||||
win = NewWindow(NULL, &windR, "\pClassiCube", true, 0, (WindowPtr)-1, false, 0);
|
||||
SetPort(win);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user