aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Stroyan <mike@LunarG.com>2015-06-15 14:20:13 -0600
committerMike Stroyan <mike@LunarG.com>2015-06-16 15:55:04 -0600
commitb46779ee1efc0fa1ab57a00a7fb1298add08a3e1 (patch)
tree623dfffaa966c0355df34037888ddd1a92529038
parent114ad16aab847943165e1af7528a533e4491bea1 (diff)
downloadusermoji-b46779ee1efc0fa1ab57a00a7fb1298add08a3e1.tar.xz
demos: cube: use AdjustWindowRect for window size
This makes renderable area size consistent.
-rw-r--r--demos/cube.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/demos/cube.c b/demos/cube.c
index e209917f..45db5526 100644
--- a/demos/cube.c
+++ b/demos/cube.c
@@ -1659,6 +1659,8 @@ static void demo_create_window(struct demo *demo)
exit(1);
}
// Create window with the registered class:
+ RECT wr = { 0, 0, demo->width, demo->height };
+ AdjustWindowRect(&wr, WS_OVERLAPPEDWINDOW, FALSE);
demo->window = CreateWindowEx(0,
demo->name, // class name
demo->name, // app name
@@ -1666,8 +1668,8 @@ static void demo_create_window(struct demo *demo)
WS_VISIBLE |
WS_SYSMENU,
100,100, // x/y coords
- demo->width, // width
- demo->height, // height
+ wr.right-wr.left, // width
+ wr.bottom-wr.top, // height
NULL, // handle to parent
NULL, // handle to menu
demo->connection, // hInstance