Fix compilation errors with latest libOGC/devkitPPC

(Partially ported from snes9xgx: a417745817)
This commit is contained in:
libertyernie 2018-07-28 16:26:19 -05:00
parent 7ea8a271b2
commit 72fee232c7
9 changed files with 5607 additions and 5603 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,77 +1,77 @@
/**************************************************************************** /****************************************************************************
* Visual Boy Advance GX * Visual Boy Advance GX
* *
* Tantric September 2008 * Tantric September 2008
* *
* filebrowser.h * filebrowser.h
* *
* Generic file routines - reading, writing, browsing * Generic file routines - reading, writing, browsing
****************************************************************************/ ****************************************************************************/
#ifndef _FILEBROWSER_H_ #ifndef _FILEBROWSER_H_
#define _FILEBROWSER_H_ #define _FILEBROWSER_H_
#include <unistd.h> #include <unistd.h>
#include <gccore.h> #include <gccore.h>
#define MAXJOLIET 255 #define MAXJOLIET 255
#ifdef HW_DOL #ifdef HW_DOL
#define MAX_BROWSER_SIZE 1000 #define MAX_BROWSER_SIZE 1000
#else #else
#define MAX_BROWSER_SIZE 3000 #define MAX_BROWSER_SIZE 3000
#endif #endif
typedef struct typedef struct
{ {
char dir[MAXPATHLEN + 1]; // directory path of browserList char dir[MAXPATHLEN + 1]; // directory path of browserList
int numEntries; // # of entries in browserList int numEntries; // # of entries in browserList
int selIndex; // currently selected index of browserList int selIndex; // currently selected index of browserList
int pageIndex; // starting index of browserList page display int pageIndex; // starting index of browserList page display
int size; // # of entries browerList has space allocated to store int size; // # of entries browerList has space allocated to store
} BROWSERINFO; } BROWSERINFO;
typedef struct typedef struct
{ {
size_t length; // file length size_t length; // file length
int isdir; // 0 - file, 1 - directory int isdir; // 0 - file, 1 - directory
char filename[MAXJOLIET + 1]; // full filename char filename[MAXJOLIET + 1]; // full filename
char displayname[MAXJOLIET + 1]; // name for browser display char displayname[MAXJOLIET + 1]; // name for browser display
int filenum; // file # (for 7z support) int filenum; // file # (for 7z support)
int icon; // icon to display int icon; // icon to display
} BROWSERENTRY; } BROWSERENTRY;
extern BROWSERINFO browser; extern BROWSERINFO browser;
extern BROWSERENTRY * browserList; extern BROWSERENTRY * browserList;
extern char ROMFilename[512]; extern char ROMFilename[512];
extern bool ROMLoaded; extern bool ROMLoaded;
extern bool loadingFile; extern bool loadingFile;
extern char szpath[MAXPATHLEN]; extern char szpath[MAXPATHLEN];
extern bool inSz; extern bool inSz;
extern char szname[MAXPATHLEN]; extern char szname[MAXPATHLEN];
enum enum
{ {
ICON_NONE, ICON_NONE,
ICON_FOLDER, ICON_FOLDER,
ICON_SD, ICON_SD,
ICON_USB, ICON_USB,
ICON_DVD, ICON_DVD,
ICON_SMB ICON_SMB
}; };
bool MakeFilePath(char filepath[], int type, char * filename = NULL, int filenum = -2); bool MakeFilePath(char filepath[], int type, char * filename = NULL, int filenum = -2);
int UpdateDirName(); int UpdateDirName();
int OpenGameList(); int OpenGameList();
int autoLoadMethod(); int autoLoadMethod();
int autoSaveMethod(bool silent); int autoSaveMethod(bool silent);
int FileSortCallback(const void *f1, const void *f2); int FileSortCallback(const void *f1, const void *f2);
void StripExt(char* returnstring, const char* inputstring); void StripExt(char* returnstring, const char* inputstring);
bool IsSz(); bool IsSz();
void ResetBrowser(); void ResetBrowser();
bool AddBrowserEntry(); bool AddBrowserEntry();
bool IsDeviceRoot(char * path); bool IsDeviceRoot(char * path);
int BrowserLoadSz(); int BrowserLoadSz();
int BrowserChangeFolder(); int BrowserChangeFolder();
int BrowserLoadFile(); int BrowserLoadFile();
#endif #endif

View File

@ -563,12 +563,12 @@ static bool ParseDirEntries()
if(ext == NULL) if(ext == NULL)
continue; continue;
if( stricmp(ext, "agb") != 0 && stricmp(ext, "gba") != 0 && if( strcasecmp(ext, "agb") != 0 && strcasecmp(ext, "gba") != 0 &&
stricmp(ext, "bin") != 0 && stricmp(ext, "elf") != 0 && strcasecmp(ext, "bin") != 0 && strcasecmp(ext, "elf") != 0 &&
stricmp(ext, "mb") != 0 && stricmp(ext, "dmg") != 0 && strcasecmp(ext, "mb") != 0 && strcasecmp(ext, "dmg") != 0 &&
stricmp(ext, "gb") != 0 && stricmp(ext, "gbc") != 0 && strcasecmp(ext, "gb") != 0 && strcasecmp(ext, "gbc") != 0 &&
stricmp(ext, "cgb") != 0 && stricmp(ext, "sgb") != 0 && strcasecmp(ext, "cgb") != 0 && strcasecmp(ext, "sgb") != 0 &&
stricmp(ext, "zip") != 0 && stricmp(ext, "7z") != 0) strcasecmp(ext, "zip") != 0 && strcasecmp(ext, "7z") != 0)
continue; continue;
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -313,7 +313,7 @@ bool InitializeNetwork(bool silent)
break; break;
} }
#else #else
networkInit = !(if_config(wiiIP, NULL, NULL, true) < 0); networkInit = !(if_config(wiiIP, NULL, NULL, true, 10) < 0);
#endif #endif
CancelAction(); CancelAction();

View File

@ -82,7 +82,7 @@ static void createXMLSetting(const char * name, const char * description, const
mxmlElementSetAttr(item, "description", description); mxmlElementSetAttr(item, "description", description);
} }
static void createXMLController(unsigned int controller[], const char * name, const char * description) static void createXMLController(u32 controller[], const char * name, const char * description)
{ {
item = mxmlNewElement(section, "controller"); item = mxmlNewElement(section, "controller");
mxmlElementSetAttr(item, "name", name); mxmlElementSetAttr(item, "name", name);
@ -201,7 +201,9 @@ preparePrefsData ()
createXMLSection("Menu", "Menu Settings"); createXMLSection("Menu", "Menu Settings");
#ifdef HW_RVL
createXMLSetting("WiimoteOrientation", "Wiimote Orientation", toStr(GCSettings.WiimoteOrientation)); createXMLSetting("WiimoteOrientation", "Wiimote Orientation", toStr(GCSettings.WiimoteOrientation));
#endif
createXMLSetting("ExitAction", "Exit Action", toStr(GCSettings.ExitAction)); createXMLSetting("ExitAction", "Exit Action", toStr(GCSettings.ExitAction));
createXMLSetting("MusicVolume", "Music Volume", toStr(GCSettings.MusicVolume)); createXMLSetting("MusicVolume", "Music Volume", toStr(GCSettings.MusicVolume));
createXMLSetting("SFXVolume", "Sound Effects Volume", toStr(GCSettings.SFXVolume)); createXMLSetting("SFXVolume", "Sound Effects Volume", toStr(GCSettings.SFXVolume));
@ -331,7 +333,7 @@ static void loadXMLSetting(float * var, const char * name)
* Load XML elements into variables for a controller mapping * Load XML elements into variables for a controller mapping
***************************************************************************/ ***************************************************************************/
static void loadXMLController(unsigned int controller[], const char * name) static void loadXMLController(u32 controller[], const char * name)
{ {
item = mxmlFindElement(xml, xml, "controller", "name", name, MXML_DESCEND); item = mxmlFindElement(xml, xml, "controller", "name", name, MXML_DESCEND);

View File

@ -41,6 +41,7 @@
#include "vba/gba/Sound.h" #include "vba/gba/Sound.h"
extern "C" { extern "C" {
extern char* strcasestr(const char *, const char *);
extern void __exception_setreload(int t); extern void __exception_setreload(int t);
} }
@ -272,7 +273,7 @@ bool SaneIOS(u32 ios)
static bool gecko = false; static bool gecko = false;
static mutex_t gecko_mutex = 0; static mutex_t gecko_mutex = 0;
static ssize_t __out_write(struct _reent *r, int fd, const char *ptr, size_t len) static ssize_t __out_write(struct _reent *r, void* fd, const char *ptr, size_t len)
{ {
if (!gecko || len == 0) if (!gecko || len == 0)
return len; return len;

View File

@ -11,6 +11,7 @@
#define _VBAGX_H_ #define _VBAGX_H_
#include <unistd.h> #include <unistd.h>
#include <sys/param.h>
#include "filelist.h" #include "filelist.h"
#include "utils/FreeTypeGX.h" #include "utils/FreeTypeGX.h"

View File

@ -32,7 +32,7 @@ u32 FrameTimer = 0;
/*** External 2D Video ***/ /*** External 2D Video ***/
/*** 2D Video Globals ***/ /*** 2D Video Globals ***/
GXRModeObj *vmode = NULL; // Graphics Mode Object GXRModeObj *vmode = NULL; // Graphics Mode Object
unsigned int *xfb[2] = { NULL, NULL }; // Framebuffers u32 *xfb[2] = { NULL, NULL }; // Framebuffers
int whichfb = 0; // Frame buffer toggle int whichfb = 0; // Frame buffer toggle
static Mtx GXmodelView2D; static Mtx GXmodelView2D;