Skip to content

Commit

Permalink
Refactor: Removed unused parentIDX parameter of Sys_CreateWindow()
Browse files Browse the repository at this point in the history
Simplifying existing window management. Windows will ultimately migrate
to libdeng2, where they will have completely new, platform-independent
management.
  • Loading branch information
skyjake committed Mar 11, 2012
1 parent 5f6d441 commit a3ca553
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
4 changes: 1 addition & 3 deletions doomsday/engine/portable/include/sys_window.h
Expand Up @@ -113,8 +113,6 @@ boolean Sys_GetDesktopBPP(int* bpp);
* Create a new window.
*
* @param app Ptr to the application structure holding our globals.
* @param parentIdx Index number of the window that is to be the parent
* of the new window. If @c 0, window has no parent.
* @param origin Origin of the window in desktop-space.
* @param size Size of the window (client area) in desktop-space.
* @param bpp BPP (bits-per-pixel)
Expand All @@ -126,7 +124,7 @@ boolean Sys_GetDesktopBPP(int* bpp);
* @return If @c 0, window creation was unsuccessful,
* ELSE 1-based index identifier of the new window.
*/
uint Sys_CreateWindow(application_t* app, uint parentIDX, const Point2Raw* origin,
uint Sys_CreateWindow(application_t* app, const Point2Raw* origin,
const Size2Raw* size, int bpp, int flags, ddwindowtype_t type, const char* title, void* data);
boolean Sys_DestroyWindow(uint idx);

Expand Down
8 changes: 3 additions & 5 deletions doomsday/engine/portable/src/sys_window.cpp
Expand Up @@ -488,14 +488,12 @@ static Window* createDDWindow(application_t*, const Size2Raw* size, int bpp, int
return &mainWindow;
}

uint Sys_CreateWindow(application_t* app, uint parentIdx, const Point2Raw* origin,
const Size2Raw* size, int bpp, int flags, ddwindowtype_t type, const char* title,
void* userData)
uint Sys_CreateWindow(application_t* app, const Point2Raw* origin,
const Size2Raw* size, int bpp, int flags, ddwindowtype_t type, const char* title, void*)
{
Window* win;
if(!winManagerInited) return 0;

win = createDDWindow(app, size, bpp, flags, type, title);
Window* win = createDDWindow(app, size, bpp, flags, type, title);
if(win) return 1; // Success.
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/unix/src/dd_uinit.c
Expand Up @@ -345,7 +345,7 @@ static int createMainWindow(void)
Size2Raw size = { 640, 480 };
char buf[256];
DD_ComposeMainWindowTitle(buf);
windowIDX = Sys_CreateWindow(&app, 0, &origin, &size, 32, 0,
windowIDX = Sys_CreateWindow(&app, &origin, &size, 32, 0,
isDedicated? WT_CONSOLE : WT_NORMAL, buf, 0);
return windowIDX != 0;
}
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/win32/src/dd_winit.c
Expand Up @@ -411,7 +411,7 @@ static BOOL createMainWindow(int lnCmdShow)
Point2Raw origin = { 0, 0 };
Size2Raw size = { 640, 480 };
DD_ComposeMainWindowTitle(buf);
windowIDX = Sys_CreateWindow(&app, 0, &origin, &size, 32, 0,
windowIDX = Sys_CreateWindow(&app, &origin, &size, 32, 0,
(isDedicated ? WT_CONSOLE : WT_NORMAL), buf, &lnCmdShow);
return windowIDX != 0;
}
Expand Down

0 comments on commit a3ca553

Please sign in to comment.