Evil hack to get directsound work under win32, will be removed when sound_sdl & other stuffs are done.

This commit is contained in:
Dabb 2000-07-30 10:17:18 +00:00
parent a046a4ba69
commit 8ccb6a9570
2 changed files with 26 additions and 1 deletions

View file

@ -68,6 +68,12 @@ int old_windowed_mouse;
extern viddef_t vid; // global video state
unsigned short d_8to16table[256];
#ifdef WIN32
// fixme: this is evil...
#include <windows.h>
HWND mainwindow;
#endif
int modestate; // fixme: just to avoid cross-comp. errors - remove later
// The original defaults
@ -173,6 +179,14 @@ void VID_Init (unsigned char *palette)
// initialize the mouse
SDL_ShowCursor(0);
#ifdef WIN32
// fixme: EVIL thing - but needed for win32 until we get
// SDL_sound ready - without this DirectSound fails.
// could replace this with SDL_SysWMInfo
mainwindow=GetActiveWindow();
#endif
}
void VID_Shutdown (void)

View file

@ -62,6 +62,12 @@ extern cvar_t *in_dga_mouseaccel;
cvar_t *_windowed_mouse;
cvar_t *m_filter;
#ifdef WIN32
/* fixme: this is evil hack */
#include <windows.h>
HWND mainwindow;
#endif
unsigned short d_8to16table[256];
unsigned d_8to24table[256];
unsigned char d_15to8table[65536];
@ -417,7 +423,12 @@ void VID_Init (unsigned char *palette)
width, height);
vid_initialized = true;
#ifdef WIN32
// fixme: EVIL thing - but needed for win32 until we get
// SDL_sound ready - without this DirectSound fails.
// could replace this with SDL_SysWMInfo
mainwindow=GetActiveWindow();
#endif
vid.recalc_refdef = 1; // force a surface cache flush
}