diff --git a/Makefile b/Makefile index 3698333f..4be51752 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ ifndef $(PREFIX) endif ifndef VERSION - SVNVERSION=$(shell test -d .svn && svnversion -n .) + -SVNVERSION=$(shell test -d .svn && svnversion -n .) BADCHARS=$(findstring :,$(SVNVERSION))$(findstring S,$(SVNVERSION)) ifeq ($(BADCHARS),) ifneq ($(SVNVERSION),) @@ -66,7 +66,7 @@ HQASMDIR=src/hq/asm ASMOBJ=${HQASMDIR}/hq3x_16${OE} ${HQASMDIR}/hq3x_32${OE} ${HQASMDIR}/hq4x_16${OE} \ -${HQASMDIR}/hq4x_32${OE} ${HQASMDIR}/hq3x32${OE} ${MAINDIR}/2xSaImmx${OE} +${HQASMDIR}/hq4x_32${OE} ${HQASMDIR}/hq3x32${OE} GBAPUOBJ=${GBAPUDIR}/Blip_Buffer${OE} ${GBAPUDIR}/Effects_Buffer${OE} ${GBAPUDIR}/Gb_Apu${OE} \ ${GBAPUDIR}/Gb_Apu_State${OE} ${GBAPUDIR}/Gb_Oscs${OE} ${GBAPUDIR}/Multi_Buffer${OE} @@ -96,7 +96,6 @@ OBJECTS=${MAINOBJ} ${DMGOBJ} ${SDLOBJ} ${GBAPUOBJ} ifeq ($(USEASM),yes) OBJECTS+=${ASMOBJ} -CXXFLAGS+=-DMMX else OBJECTS+=${CALTERNOBJ} endif diff --git a/src/sdl/SDL.cpp b/src/sdl/SDL.cpp index e961ed99..089c9040 100644 --- a/src/sdl/SDL.cpp +++ b/src/sdl/SDL.cpp @@ -435,7 +435,7 @@ FILE *sdlFindFile(const char *name) } #ifdef _WIN32 - home = getenv("USERPROFILE"); + char *home = getenv("USERPROFILE"); if(home != NULL) { fprintf(stderr, "Searching user profile directory: %s\n", home); sprintf(path, "%s%c%s", home, FILE_SEP, name); @@ -1602,12 +1602,16 @@ int main(int argc, char **argv) char buf[1024]; struct stat s; +#ifndef _WIN32 // Get home dir homeDir = getenv("HOME"); snprintf(buf, 1024, "%s/%s", homeDir, DOT_DIR); // Make dot dir if not existent if (stat(buf, &s) == -1 || !S_ISDIR(s.st_mode)) mkdir(buf, 0755); +#else + homeDir = 0; +#endif sdlReadPreferences(); @@ -2123,6 +2127,7 @@ void systemDrawScreen() drawSpeed(screen, destPitch, 10, 20); if (openGL) { + glClear( GL_COLOR_BUFFER_BIT ); glPixelStorei(GL_UNPACK_ROW_LENGTH, destWidth); if (systemColorDepth == 16) glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, destWidth, destHeight,