From 147414033acaf887675c5d3b4a6c100134096fb0 Mon Sep 17 00:00:00 2001 From: Rcmaniac25 Date: Thu, 12 Sep 2013 00:24:25 -0400 Subject: [PATCH] Added (though commented out) support for setting window position --- .../src/blackberry/fg_window_blackberry.c | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/freeglut/freeglut/src/blackberry/fg_window_blackberry.c b/freeglut/freeglut/src/blackberry/fg_window_blackberry.c index 9f35750..61bd58d 100644 --- a/freeglut/freeglut/src/blackberry/fg_window_blackberry.c +++ b/freeglut/freeglut/src/blackberry/fg_window_blackberry.c @@ -78,12 +78,22 @@ void fgPlatformOpenWindow( SFG_Window* window, const char* title, return; } - /* Could set size based on what is specified for window. Work on another time - int size[2]; + /* Uncomment when multiple windows are supported + int value[2]; + if(positionUse) { + value[0] = x; + value[1] = y; + if (screen_set_window_property_iv(sWindow, SCREEN_PROPERTY_POSITION, value)) { + screen_destroy_window(sWindow); + fgError("Could not set window position"); + return; + } + } + if(sizeUse) { - size[0] = w; - size[1] = h; - if (screen_set_window_property_iv(sWindow, SCREEN_PROPERTY_BUFFER_SIZE, size)) { + value[0] = w; + value[1] = h; + if (screen_set_window_property_iv(sWindow, SCREEN_PROPERTY_BUFFER_SIZE, value)) { screen_destroy_window(sWindow); fgError("Could not set window buffer size"); return;