diff --git a/build_linux.sh b/build_linux.sh index 3e40ea9..f82cb95 100644 --- a/build_linux.sh +++ b/build_linux.sh @@ -1,2 +1,2 @@ #!/bin/sh -gcc main.c mbc.c apu.c audio.c alhelpers.c cpu.c mem.c ppu.c input.c -DAUDIO_FLOAT -DFREEGLUT_STATIC -lglut -lopenal -lGL -lGLU -lm -Wall -Wextra -O3 -msse -mfpmath=sse -ffast-math -s -o fixGB +gcc main.c mbc.c apu.c audio.c alhelpers.c cpu.c mem.c ppu.c input.c -DFREEGLUT_STATIC -lglut -lopenal -lGL -lGLU -lm -Wall -Wextra -O3 -flto -s -o fixGB diff --git a/build_msys32.sh b/build_msys32.sh new file mode 100644 index 0000000..8185a2b --- /dev/null +++ b/build_msys32.sh @@ -0,0 +1,2 @@ +#!/bin/sh +gcc -DWINDOWS_BUILD main.c mbc.c apu.c audio.c alhelpers.c cpu.c mem.c ppu.c input.c -DFREEGLUT_STATIC -lfreeglut_static -lopenal32 -lopengl32 -lglu32 -lgdi32 -lwinmm -lm -Wall -Wextra -O3 -flto -s -o fixGB diff --git a/build_windows_console.bat b/build_windows_console.bat index 48fa97d..029143e 100644 --- a/build_windows_console.bat +++ b/build_windows_console.bat @@ -1,2 +1,2 @@ -gcc -DWINDOWS_BUILD main.c mbc.c apu.c audio.c alhelpers.c cpu.c mem.c ppu.c input.c -DAUDIO_FLOAT -DFREEGLUT_STATIC -lfreeglut_static -lopenal32 -lopengl32 -lglu32 -lgdi32 -lwinmm -Wall -Wextra -O3 -msse -mfpmath=sse -ffast-math -s -o fixGB +gcc -DWINDOWS_BUILD main.c mbc.c apu.c audio.c alhelpers.c cpu.c mem.c ppu.c input.c -DFREEGLUT_STATIC -lfreeglut_static -lopenal32 -lopengl32 -lglu32 -lgdi32 -lwinmm -Wall -Wextra -O3 -flto -s -o fixGB pause \ No newline at end of file diff --git a/main.c b/main.c index 9ccbf02..5b2c7be 100644 --- a/main.c +++ b/main.c @@ -26,7 +26,7 @@ #define DEBUG_KEY 0 #define DEBUG_LOAD_INFO 1 -static const char *VERSION_STRING = "fixGB Alpha v0.5.3"; +static const char *VERSION_STRING = "fixGB Alpha v0.5.4"; static void gbEmuDisplayFrame(void); static void gbEmuMainLoop(void); @@ -606,8 +606,7 @@ static void gbEmuDisplayFrame() emuRenderFrame = false; return; } - if(textureImage != NULL) - glTexImage2D(GL_TEXTURE_2D, 0, 4, VISIBLE_DOTS, VISIBLE_LINES, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, textureImage); + glTexImage2D(GL_TEXTURE_2D, 0, 4, VISIBLE_DOTS, VISIBLE_LINES, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, textureImage); emuRenderFrame = false; } diff --git a/mbc.c b/mbc.c index 445328c..29fda31 100644 --- a/mbc.c +++ b/mbc.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "mem.h" #include "mbc.h"