diff --git a/src/dos/drive_cache.cpp b/src/dos/drive_cache.cpp index 2facf3f..daca286 100644 --- a/src/dos/drive_cache.cpp +++ b/src/dos/drive_cache.cpp @@ -185,7 +185,9 @@ char* DOS_Drive_Cache::GetExpandName(const char* path) { #else if((len > 1) && (work[len-1] == CROSS_FILESPLIT )) { #endif +#ifndef HW_RVL work[len-1] = 0; // Remove trailing slashes except when in root +#endif } } return work; diff --git a/src/gui/render_scalers.h b/src/gui/render_scalers.h index 4bd22b0..5e09d28 100644 --- a/src/gui/render_scalers.h +++ b/src/gui/render_scalers.h @@ -21,18 +21,29 @@ //#include "render.h" #include "video.h" -#if RENDER_USE_ADVANCED_SCALERS>0 -#define SCALER_MAXWIDTH 1280 -#define SCALER_MAXHEIGHT 1024 -#else -// reduced to save some memory -#define SCALER_MAXWIDTH 800 -#define SCALER_MAXHEIGHT 600 -#endif -#if RENDER_USE_ADVANCED_SCALERS>1 -#define SCALER_COMPLEXWIDTH 800 -#define SCALER_COMPLEXHEIGHT 600 +#ifdef HW_RVL + #define SCALER_MAXWIDTH 640 + #define SCALER_MAXHEIGHT 480 + + #if RENDER_USE_ADVANCED_SCALERS>1 + #define SCALER_COMPLEXWIDTH 640 + #define SCALER_COMPLEXHEIGHT 480 + #endif +#else + #if RENDER_USE_ADVANCED_SCALERS>0 + #define SCALER_MAXWIDTH 1280 + #define SCALER_MAXHEIGHT 1024 + #else + // reduced to save some memory + #define SCALER_MAXWIDTH 800 + #define SCALER_MAXHEIGHT 600 + #endif + + #if RENDER_USE_ADVANCED_SCALERS>1 + #define SCALER_COMPLEXWIDTH 800 + #define SCALER_COMPLEXHEIGHT 600 + #endif #endif #define SCALER_BLOCKSIZE 16 diff --git a/src/platform/wii/missingfunctions.cpp b/src/platform/wii/missingfunctions.cpp index 386c3bc..90bcbce 100644 --- a/src/platform/wii/missingfunctions.cpp +++ b/src/platform/wii/missingfunctions.cpp @@ -5,31 +5,36 @@ #include #include #include "dos_inc.h" -#define MAX_FILENAME_LENGTH 256 -static char tmp[MAX_FILENAME_LENGTH]; -char * dirname(char * file) { - // CAKTODO +static char tmp[MAXPATHLEN]; + +char * dirname(char * file) +{ + if(!file || file[0] == 0) + return "."; + char * sep = strrchr(file, '/'); if (sep == NULL) sep = strrchr(file, '\\'); if (sep == NULL) - return ""; - else { - int len = (int)(sep - file); - safe_strncpy(tmp, file, len+1); - return tmp; - } + return "."; + + int len = (int)(sep - file); + safe_strncpy(tmp, file, len+1); + return tmp; } -int access(const char *path, int amode) { +int access(const char *path, int amode) +{ struct stat st; bool folderExists = (stat(path, &st) == 0); if (folderExists) return 0; else return ENOENT; } -int rmdir(const char *path) { +int rmdir(const char *path) +{ return remove(path); } -int execlp(const char *file, const char *arg, ...) { +int execlp(const char *file, const char *arg, ...) +{ return -1; }