Skip to content

Commit

Permalink
Fixed various FTBFS issues when using the SDL window management.
Browse files Browse the repository at this point in the history
  • Loading branch information
danij committed Mar 23, 2008
1 parent f8095fb commit 108a3e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions doomsday/engine/portable/include/sys_window.h
Expand Up @@ -102,8 +102,8 @@ typedef struct {
#define DDSW_NOVISIBLE 0x08
#define DDSW_NOFULLSCREEN 0x10
#define DDSW_NOCENTER 0x20
#define DDSW_NOCHANGES (DDSW_NOSIZE & DDSW_NOMOVE & DDSW_NOBPP & \
DDSW_NOFULLSCREEN & DDSW_NOVISIBLE & \
#define DDSW_NOCHANGES (DDSW_NOSIZE | DDSW_NOMOVE | DDSW_NOBPP | \
DDSW_NOFULLSCREEN | DDSW_NOVISIBLE | \
DDSW_NOCENTER)

/**
Expand Down
15 changes: 8 additions & 7 deletions doomsday/engine/portable/src/sys_sdl_window.c
Expand Up @@ -193,7 +193,7 @@ void Sys_ConPrint(uint idx, const char *text, int clflags)
wrefresh(win->console.winText);

// Move the cursor back onto the command line.
sysSetConWindowCmdLine(1, NULL, 0, 0);
setConWindowCmdLine(1, NULL, 0, 0);
}

static void setConWindowCmdLine(uint idx, const char *text,
Expand Down Expand Up @@ -414,13 +414,14 @@ boolean Sys_GetWindowManagerInfo(wminfo_t *info)
}

static ddwindow_t *createDDWindow(application_t *app, int w, int h, int bpp,
int flags, boolean console, const char *title)
int flags, ddwindowtype_t type,
const char *title)
{
// SDL only supports one window.
if(mainWindowInited)
return NULL;

if(console)
if(type == WT_CONSOLE)
{
#if defined(UNIX)
int maxPos[2];
Expand Down Expand Up @@ -452,7 +453,7 @@ static ddwindow_t *createDDWindow(application_t *app, int w, int h, int bpp,

keypad(mainWindow.console.winCommand, TRUE);
nodelay(mainWindow.console.winCommand, TRUE);
setConWindowCmdLine(&mainWindow, "", 1, 0);
setConWindowCmdLine(1, "", 1, 0);

// The background will also be in reverse.
wbkgdset(mainWindow.console.winTitle, ' ' | A_REVERSE);
Expand Down Expand Up @@ -509,7 +510,7 @@ static ddwindow_t *createDDWindow(application_t *app, int w, int h, int bpp,
* @param h Height (client area).
* @param bpp BPP (bits-per-pixel)
* @param flags DDWF_* flags, control appearance/behavior.
* @param console @c true = this is to be a terminal window.
* @param type Type of window to be created.
* @param title Window title string, ELSE @c NULL,.
* @param data Platform specific data.
*
Expand All @@ -518,7 +519,7 @@ static ddwindow_t *createDDWindow(application_t *app, int w, int h, int bpp,
*/
uint Sys_CreateWindow(application_t *app, uint parentIDX,
int x, int y, int w, int h, int bpp, int flags,
boolean console, const char *title, void *data)
ddwindowtype_t type, const char *title, void *data)
{
ddwindow_t *win;

Expand All @@ -528,7 +529,7 @@ uint Sys_CreateWindow(application_t *app, uint parentIDX,
if(!winManagerInited)
return 0; // Window manager not initialized yet.

win = createDDWindow(app, w, h, bpp, flags, console, title);
win = createDDWindow(app, w, h, bpp, flags, type, title);

if(win)
return 1; // Success.
Expand Down

0 comments on commit 108a3e1

Please sign in to comment.