diff --git a/Source/Glide64/GlideExtensions.h b/Source/Glide64/GlideExtensions.h index aee41f7eb..d4be2a371 100644 --- a/Source/Glide64/GlideExtensions.h +++ b/Source/Glide64/GlideExtensions.h @@ -52,7 +52,7 @@ FX_ENTRY void FX_CALL grGetGammaTableExt(FxU32, FxU32*, FxU32*, FxU32*); FX_ENTRY GrContext_t FX_CALL grSstWinOpenExt( - FxU32 hWnd, + HWND hWnd, GrScreenResolution_t screen_resolution, GrScreenRefresh_t refresh_rate, GrColorFormat_t color_format, diff --git a/Source/Glide64/Main.cpp b/Source/Glide64/Main.cpp index f4d9b3684..9289198cb 100644 --- a/Source/Glide64/Main.cpp +++ b/Source/Glide64/Main.cpp @@ -905,7 +905,7 @@ int InitGfx () 1); // 1 auxillary buffer }*/ if (!gfx_context) - gfx_context = grSstWinOpen (wxPtrToUInt(gfx.hWnd), + gfx_context = grSstWinOpen (gfx.hWnd, res_data, GR_REFRESH_60Hz, GR_COLORFORMAT_RGBA, diff --git a/Source/Glitch64/OGLglitchmain.cpp b/Source/Glitch64/OGLglitchmain.cpp index 903e8be72..d45602c01 100644 --- a/Source/Glitch64/OGLglitchmain.cpp +++ b/Source/Glitch64/OGLglitchmain.cpp @@ -762,7 +762,7 @@ int isWglExtensionSupported(const char *extension) FX_ENTRY GrContext_t FX_CALL grSstWinOpenExt( - FxU32 hWnd, + HWND hWnd, GrScreenResolution_t screen_resolution, GrScreenRefresh_t refresh_rate, GrColorFormat_t color_format, @@ -787,7 +787,7 @@ grSstWinOpenExt( FX_ENTRY GrContext_t FX_CALL grSstWinOpen( - FxU32 hWnd, + HWND hWnd, GrScreenResolution_t screen_resolution, GrScreenRefresh_t refresh_rate, GrColorFormat_t color_format, @@ -824,7 +824,7 @@ grSstWinOpen( LOG("grSstWinOpen(%08lx, %d, %d, %d, %d, %d %d)\r\n", hWnd, screen_resolution&~0x80000000, refresh_rate, color_format, origin_location, nColBuffers, nAuxBuffers); #ifdef _WIN32 - if ((HWND)hWnd == NULL) hWnd = (FxU32)GetActiveWindow(); + if ((HWND)hWnd == NULL) hWnd = GetActiveWindow(); hwnd_win = (HWND)hWnd; #endif // _WIN32 width = height = 0; diff --git a/Source/Glitch64/inc/glide.h b/Source/Glitch64/inc/glide.h index d89f049ff..25c9ca8e5 100644 --- a/Source/Glitch64/inc/glide.h +++ b/Source/Glitch64/inc/glide.h @@ -42,6 +42,10 @@ #include <3dfx.h> #include #include +#ifdef _WIN32 +#include +#endif + #ifdef __cplusplus extern "C" { @@ -60,6 +64,10 @@ typedef FxU8 GrFog_t; typedef FxU32 GrContext_t; typedef int (FX_CALL *GrProc)(); +#ifndef _WIN32 +typedef int HWND; +#endif + /* ** ----------------------------------------------------------------------- ** CONSTANTS AND TYPES @@ -617,7 +625,7 @@ grFlush(void); FX_ENTRY GrContext_t FX_CALL grSstWinOpen( - FxU32 hWnd, + HWND hWnd, GrScreenResolution_t screen_resolution, GrScreenRefresh_t refresh_rate, GrColorFormat_t color_format, diff --git a/Source/Glitch64/inc/glidesys.h b/Source/Glitch64/inc/glidesys.h index b19845a9a..12d0fcbd6 100644 --- a/Source/Glitch64/inc/glidesys.h +++ b/Source/Glitch64/inc/glidesys.h @@ -110,7 +110,8 @@ n** ----------------------------------------------------------------------- /* Check for OS */ #if defined(__IRIX__) || defined(__sparc__) || defined(__linux__) || \ - defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ + defined(__FreeBSD_kernel__) || defined(__GNU__) # define GLIDE_OS GLIDE_OS_UNIX #elif defined(__DOS__) # define GLIDE_OS GLIDE_OS_DOS32