mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 14:52:08 +00:00
Evil hack to get directsound work under win32, will be removed when sound_sdl & other stuffs are done.
This commit is contained in:
parent
a046a4ba69
commit
8ccb6a9570
2 changed files with 26 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue