mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
* add missing includes
* fix a to small array
This commit is contained in:
parent
a976c4e530
commit
cec8a231e7
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <wchar.h>
|
||||
#include "FreeTypeGX.h"
|
||||
#include "settings/cfg.h"
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "gct.h"
|
||||
|
||||
#define ERRORRANGE "Error: CheatNr out of range"
|
||||
|
@ -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
|
||||
};
|
||||
|
@ -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;
|
||||
|
@ -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(;;)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user