* add missing includes

* fix a to small array
This commit is contained in:
ardi@ist-einmalig.de 2009-10-14 17:20:24 +00:00
parent a976c4e530
commit cec8a231e7
5 changed files with 12 additions and 7 deletions

View File

@ -21,6 +21,7 @@
*/
#include <sys/stat.h>
#include <wchar.h>
#include "FreeTypeGX.h"
#include "settings/cfg.h"

View File

@ -6,6 +6,8 @@
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <string.h>
#include "gct.h"
#define ERRORRANGE "Error: CheatNr out of range"

View File

@ -35,6 +35,7 @@
#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include <vector>
#include <math.h>
#include <asndlib.h>
@ -464,7 +465,7 @@ class GuiElement
bool selectable; //!< Whether or not this element selectable (can change to SELECTED state)
bool clickable; //!< Whether or not this element is clickable (can change to CLICKED state)
bool holdable; //!< Whether or not this element is holdable (can change to HELD state)
GuiTrigger * trigger[5]; //!< GuiTriggers (input actions) that this element responds to
GuiTrigger * trigger[6]; //!< GuiTriggers (input actions) that this element responds to
GuiElement * parentElement; //!< Parent element
UpdateCallback updateCB; //!< Callback function to call when this element is updated
};

View File

@ -34,7 +34,7 @@ GuiElement::GuiElement()
trigger[2] = NULL;
trigger[3] = NULL;
trigger[4] = NULL;
trigger[6] = NULL;
trigger[5] = NULL;
parentElement = NULL;
rumble = true;
selectable = false;

View File

@ -13,6 +13,7 @@
#include "../wad/title.h"
#include <algorithm>
#include <vector>
#include <wchar.h>
#include "listfiles.h"
@ -29,16 +30,16 @@ wchar_t *gameFilterPrev=NULL;
extern u8 mountMethod;
/****************************************************************************
* wcsdup based on new wchar_t [...]
* wcsdup_new based on new wchar_t [...]
***************************************************************************/
wchar_t *wcsdup(const wchar_t *src)
static wchar_t *wcsdup_new(const wchar_t *src)
{
int len = wcslen(src)+1;
wchar_t *dst = new wchar_t[len];
if(dst) wcscpy(dst, src);
return dst;
}
inline int wcsnicmp(const wchar_t *s1, const wchar_t *s2, int len)
static inline int wcsnicmp(const wchar_t *s1, const wchar_t *s2, int len)
{
if (len <= 0)
return (0);
@ -131,7 +132,7 @@ int __Menu_GetPrevFilter(int t, wchar_t* gameFilter, u32 gameFiltered, wchar_t *
u32 cnt, len, i;
s32 ret;
wchar_t *new_gameFilterPrev = wcsdup(gameFilter);
wchar_t *new_gameFilterPrev = wcsdup_new(gameFilter);
/* Get list length */
@ -532,7 +533,7 @@ int __Menu_GetEntries(int t, const wchar_t* Filter) {
wchar_t *new_gameFilterNextList = NULL;
wchar_t *new_gameFilterPrev = NULL;
new_gameFilter = wcsdup(Filter ? Filter : (gameFilter ? gameFilter : L"") );
new_gameFilter = wcsdup_new(Filter ? Filter : (gameFilter ? gameFilter : L"") );
if(new_gameFilter == NULL) return -1;
for(;;)
{