mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@656 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
546e361166
commit
fe2862eb91
2 changed files with 27 additions and 16 deletions
|
@ -60,8 +60,8 @@ static void PopulateForm(void)
|
||||||
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCFULLSCREEN), (settings.fullscreen ? BST_CHECKED : BST_UNCHECKED));
|
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCFULLSCREEN), (settings.fullscreen ? BST_CHECKED : BST_UNCHECKED));
|
||||||
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCALWAYSSHOW), (settings.forcesetup ? BST_CHECKED : BST_UNCHECKED));
|
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCALWAYSSHOW), (settings.forcesetup ? BST_CHECKED : BST_UNCHECKED));
|
||||||
|
|
||||||
ComboBox_ResetContent(hwnd2d);
|
(void)ComboBox_ResetContent(hwnd2d);
|
||||||
ComboBox_ResetContent(hwnd3d);
|
(void)ComboBox_ResetContent(hwnd3d);
|
||||||
for (i=0; i<validmodecnt; i++)
|
for (i=0; i<validmodecnt; i++)
|
||||||
{
|
{
|
||||||
if (validmode[i].fs != settings.fullscreen) continue;
|
if (validmode[i].fs != settings.fullscreen) continue;
|
||||||
|
@ -69,15 +69,15 @@ static void PopulateForm(void)
|
||||||
// all modes get added to the 3D mode list
|
// all modes get added to the 3D mode list
|
||||||
Bsprintf(buf, "%d x %d %dbpp", validmode[i].xdim, validmode[i].ydim, validmode[i].bpp);
|
Bsprintf(buf, "%d x %d %dbpp", validmode[i].xdim, validmode[i].ydim, validmode[i].bpp);
|
||||||
j = ComboBox_AddString(hwnd3d, buf);
|
j = ComboBox_AddString(hwnd3d, buf);
|
||||||
ComboBox_SetItemData(hwnd3d, j, i);
|
(void)ComboBox_SetItemData(hwnd3d, j, i);
|
||||||
if (i == mode3d) ComboBox_SetCurSel(hwnd3d, j);
|
if (i == mode3d) (void)ComboBox_SetCurSel(hwnd3d, j);
|
||||||
|
|
||||||
// only 8-bit modes get used for 2D
|
// only 8-bit modes get used for 2D
|
||||||
if (validmode[i].bpp != 8 || validmode[i].xdim < 640 || validmode[i].ydim < 480) continue;
|
if (validmode[i].bpp != 8 || validmode[i].xdim < 640 || validmode[i].ydim < 480) continue;
|
||||||
Bsprintf(buf, "%d x %d", validmode[i].xdim, validmode[i].ydim);
|
Bsprintf(buf, "%d x %d", validmode[i].xdim, validmode[i].ydim);
|
||||||
j = ComboBox_AddString(hwnd2d, buf);
|
j = ComboBox_AddString(hwnd2d, buf);
|
||||||
ComboBox_SetItemData(hwnd2d, j, i);
|
(void)ComboBox_SetItemData(hwnd2d, j, i);
|
||||||
if (i == mode2d) ComboBox_SetCurSel(hwnd2d, j);
|
if (i == mode2d) (void)ComboBox_SetCurSel(hwnd2d, j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -266,6 +266,9 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||||
|
UNREFERENCED_PARAMETER(nCmdShow);
|
||||||
|
|
||||||
hInstance = hInst;
|
hInstance = hInst;
|
||||||
|
|
||||||
if (CheckWinVersion() || hPrevInst)
|
if (CheckWinVersion() || hPrevInst)
|
||||||
|
@ -582,7 +585,7 @@ void uninitsystem(void)
|
||||||
void initprintf(const char *f, ...)
|
void initprintf(const char *f, ...)
|
||||||
{
|
{
|
||||||
va_list va;
|
va_list va;
|
||||||
char buf[1024],*p=NULL,*q=NULL,workbuf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
va_start(va, f);
|
va_start(va, f);
|
||||||
Bvsnprintf(buf, 1024, f, va);
|
Bvsnprintf(buf, 1024, f, va);
|
||||||
|
@ -1010,7 +1013,8 @@ void releaseallbuttons(void)
|
||||||
static BOOL CALLBACK InitDirectInput_enum(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef)
|
static BOOL CALLBACK InitDirectInput_enum(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef)
|
||||||
{
|
{
|
||||||
const char *d;
|
const char *d;
|
||||||
int i;
|
|
||||||
|
UNREFERENCED_PARAMETER(pvRef);
|
||||||
|
|
||||||
#define COPYGUID(d,s) memcpy(&d,&s,sizeof(GUID))
|
#define COPYGUID(d,s) memcpy(&d,&s,sizeof(GUID))
|
||||||
|
|
||||||
|
@ -1027,6 +1031,8 @@ static BOOL CALLBACK InitDirectInput_enum(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRe
|
||||||
COPYGUID(guidDevs[MOUSE],lpddi->guidInstance);
|
COPYGUID(guidDevs[MOUSE],lpddi->guidInstance);
|
||||||
break;
|
break;
|
||||||
case DIDEVTYPE_JOYSTICK:
|
case DIDEVTYPE_JOYSTICK:
|
||||||
|
{
|
||||||
|
int i;
|
||||||
inputdevices |= (1<<JOYSTICK);
|
inputdevices |= (1<<JOYSTICK);
|
||||||
joyisgamepad = ((lpddi->dwDevType & (DIDEVTYPEJOYSTICK_GAMEPAD<<8)) != 0);
|
joyisgamepad = ((lpddi->dwDevType & (DIDEVTYPEJOYSTICK_GAMEPAD<<8)) != 0);
|
||||||
d = joyisgamepad ? "GAMEPAD" : "JOYSTICK";
|
d = joyisgamepad ? "GAMEPAD" : "JOYSTICK";
|
||||||
|
@ -1053,7 +1059,8 @@ static BOOL CALLBACK InitDirectInput_enum(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRe
|
||||||
lpddi->guidProduct.Data4[6], lpddi->guidProduct.Data4[7]
|
lpddi->guidProduct.Data4[6], lpddi->guidProduct.Data4[7]
|
||||||
);
|
);
|
||||||
*/
|
*/
|
||||||
break;
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
d = "OTHER"; break;
|
d = "OTHER"; break;
|
||||||
}
|
}
|
||||||
|
@ -1077,7 +1084,6 @@ static const char *joyfindnameforofs(int ofs)
|
||||||
|
|
||||||
static BOOL CALLBACK InitDirectInput_enumobjects(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef)
|
static BOOL CALLBACK InitDirectInput_enumobjects(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef)
|
||||||
{
|
{
|
||||||
unsigned i;
|
|
||||||
int *typecounts = (int*)pvRef;
|
int *typecounts = (int*)pvRef;
|
||||||
|
|
||||||
if (lpddoi->dwType & DIDFT_AXIS)
|
if (lpddoi->dwType & DIDFT_AXIS)
|
||||||
|
@ -1131,7 +1137,7 @@ static BOOL InitDirectInput(void)
|
||||||
LPDIRECTINPUTDEVICE2A dev2;
|
LPDIRECTINPUTDEVICE2A dev2;
|
||||||
DIDEVCAPS didc;
|
DIDEVCAPS didc;
|
||||||
|
|
||||||
int devn,i;
|
int devn;
|
||||||
|
|
||||||
if (bDInputInited) return FALSE;
|
if (bDInputInited) return FALSE;
|
||||||
|
|
||||||
|
@ -1508,7 +1514,6 @@ static void ProcessInputDevices(void)
|
||||||
if (result == DI_OK)
|
if (result == DI_OK)
|
||||||
{
|
{
|
||||||
DWORD k, numlockon = FALSE;
|
DWORD k, numlockon = FALSE;
|
||||||
static DWORD shiftkey = 0, shiftkeycount = 0;
|
|
||||||
|
|
||||||
numlockon = (GetKeyState(VK_NUMLOCK) & 1);
|
numlockon = (GetKeyState(VK_NUMLOCK) & 1);
|
||||||
|
|
||||||
|
@ -2122,6 +2127,8 @@ static HRESULT WINAPI getvalidmodes_enum(DDSURFACEDESC *ddsd, VOID *udata)
|
||||||
{
|
{
|
||||||
unsigned maxx = MAXXDIM, maxy = MAXYDIM;
|
unsigned maxx = MAXXDIM, maxy = MAXYDIM;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(udata);
|
||||||
|
|
||||||
if (ddsd->ddpfPixelFormat.dwRGBBitCount == 8)
|
if (ddsd->ddpfPixelFormat.dwRGBBitCount == 8)
|
||||||
{
|
{
|
||||||
CHECK(ddsd->dwWidth, ddsd->dwHeight)
|
CHECK(ddsd->dwWidth, ddsd->dwHeight)
|
||||||
|
@ -2421,6 +2428,8 @@ int setpalette(int start, int num, char *dapal)
|
||||||
RGBQUAD *rgb;
|
RGBQUAD *rgb;
|
||||||
//HPALETTE hPalPrev;
|
//HPALETTE hPalPrev;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(dapal);
|
||||||
|
|
||||||
struct logpal
|
struct logpal
|
||||||
{
|
{
|
||||||
WORD palVersion;
|
WORD palVersion;
|
||||||
|
@ -2650,6 +2659,9 @@ static int getgammaramp(WORD gt[3][256])
|
||||||
// device enumerator
|
// device enumerator
|
||||||
static BOOL WINAPI InitDirectDraw_enum(GUID *lpGUID, LPSTR lpDesc, LPSTR lpName, LPVOID lpContext)
|
static BOOL WINAPI InitDirectDraw_enum(GUID *lpGUID, LPSTR lpDesc, LPSTR lpName, LPVOID lpContext)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(lpGUID);
|
||||||
|
UNREFERENCED_PARAMETER(lpName);
|
||||||
|
UNREFERENCED_PARAMETER(lpContext);
|
||||||
initprintf(" * %s\n", lpDesc);
|
initprintf(" * %s\n", lpDesc);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -3161,7 +3173,6 @@ static int SetupOpenGL(int width, int height, int bitspp)
|
||||||
|
|
||||||
{
|
{
|
||||||
GLubyte *p,*p2,*p3;
|
GLubyte *p,*p2,*p3;
|
||||||
int i;
|
|
||||||
|
|
||||||
glinfo.vendor = (char *)bglGetString(GL_VENDOR);
|
glinfo.vendor = (char *)bglGetString(GL_VENDOR);
|
||||||
glinfo.renderer = (char *)bglGetString(GL_RENDERER);
|
glinfo.renderer = (char *)bglGetString(GL_RENDERER);
|
||||||
|
@ -3902,9 +3913,9 @@ static BOOL CheckWinVersion(void)
|
||||||
//
|
//
|
||||||
static LRESULT CALLBACK WndProcCallback(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
static LRESULT CALLBACK WndProcCallback(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
RECT rect;
|
/* RECT rect;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
HRESULT result;
|
HRESULT result; */
|
||||||
|
|
||||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||||
if (hWnd == hGLWindow) return DefWindowProc(hWnd,uMsg,wParam,lParam);
|
if (hWnd == hGLWindow) return DefWindowProc(hWnd,uMsg,wParam,lParam);
|
||||||
|
|
Loading…
Reference in a new issue