1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00

Fix windows compilation for Mupen64Plus 2.0

This commit is contained in:
Sergey Lipskiy 2014-05-18 21:27:05 +07:00
parent 277b26cec2
commit 3ec5e21647
4 changed files with 15 additions and 10 deletions

View File

@ -1,5 +1,3 @@
#include "winlnxdefs.h"
#include <SDL.h>
#include <errno.h>
#include <string.h>
@ -74,7 +72,11 @@ void Config_SetOption(char* line, char* val)
{
for(int i=0; i< configOptionsSize; i++) {
Option *o = &configOptions[i];
#ifndef _WINDOWS
if (strcasecmp(line, o->name) == 0) {
#else
if (_stricmp(line, o->name) == 0) {
#endif
if (o->data) {
int v = atoi(val);
*(o->data) = v;

View File

@ -18,17 +18,20 @@
char pluginName[] = "GLideN64 alpha";
#ifndef MUPENPLUSAPI
#include "ZilmarGFX_1_3.h"
#ifdef _WINDOWS
HWND hWnd;
HWND hStatusBar;
//HWND hFullscreen;
HWND hToolBar;
HINSTANCE hInstance;
#define DLSYM(a, b) GetProcAddress(a, b)
#else
#define DLSYM(a, b) dlsym(a, b)
#endif // _WINDOWS
#ifndef MUPENPLUSAPI
#include "ZilmarGFX_1_3.h"
char *screenDirectory;
void (*CheckInterrupts)( void );
@ -137,8 +140,8 @@ extern "C" {
EXPORT m64p_error CALL PluginStartup(m64p_dynlib_handle CoreLibHandle, void *Context, void (*DebugCallback)(void *, int, const char *))
{
ConfigGetSharedDataFilepath = (ptr_ConfigGetSharedDataFilepath) dlsym(CoreLibHandle, "ConfigGetSharedDataFilepath");
ConfigGetUserConfigPath = (ptr_ConfigGetUserConfigPath) dlsym(CoreLibHandle, "ConfigGetUserConfigPath");
ConfigGetSharedDataFilepath = (ptr_ConfigGetSharedDataFilepath) DLSYM(CoreLibHandle, "ConfigGetSharedDataFilepath");
ConfigGetUserConfigPath = (ptr_ConfigGetUserConfigPath) DLSYM(CoreLibHandle, "ConfigGetUserConfigPath");
return M64ERR_SUCCESS;
}

View File

@ -3,8 +3,6 @@
extern char pluginName[];
#ifndef MUPENPLUSAPI
#ifdef _WINDOWS
#include <windows.h>
extern HWND hWnd;
@ -14,6 +12,8 @@ extern HWND hToolBar;
extern HINSTANCE hInstance;
#endif
#ifndef MUPENPLUSAPI
//#define DEBUG
extern void (*CheckInterrupts)( void );

View File

@ -1188,7 +1188,7 @@ void OGL_ClearColorBuffer( float *color )
void OGL_SaveScreenshot()
{
#ifdef _WINDOWS
#if defined(_WINDOWS) && !defined(MUPENPLUSAPI)
BITMAPFILEHEADER fileHeader;
BITMAPINFOHEADER infoHeader;
HANDLE hBitmapFile;