all repos — mgba @ f98d6486efee2ee4ad9d2d4b3786004cb3ee4b76

mGBA Game Boy Advance Emulator

Merge branch 'master' into port/qt
Jeffrey Pfau jeffrey@endrift.com
Sun, 26 Oct 2014 03:49:12 -0700
commit

f98d6486efee2ee4ad9d2d4b3786004cb3ee4b76

parent

6c9a5a24207e956fb551f45250bfd39aa07f2201

M CMakeLists.txtCMakeLists.txt

@@ -96,7 +96,7 @@

# Platform support if(WIN32) add_definitions(-D_WIN32_WINNT=0x0600) - list(APPEND OS_LIB Ws2_32) + list(APPEND OS_LIB ws2_32) file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/windows/*.c) source_group("Windows-specific code" FILES ${OS_SRC}) else()
M src/gba/gba-bios.csrc/gba/gba-bios.c

@@ -318,7 +318,7 @@ node = cpu->memory.load8(cpu, nPointer, 0);

while (remaining > 0) { uint32_t bitstream = cpu->memory.load32(cpu, sPointer, 0); sPointer += 4; - for (bitsRemaining = 32; bitsRemaining > 0; --bitsRemaining, bitstream <<= 1) { + for (bitsRemaining = 32; bitsRemaining > 0 && remaining > 0; --bitsRemaining, bitstream <<= 1) { uint32_t next = (nPointer & ~1) + HuffmanNodeGetOffset(node) * 2 + 2; if (bitstream & 0x80000000) { // Go right
M src/platform/sdl/CMakeLists.txtsrc/platform/sdl/CMakeLists.txt

@@ -5,9 +5,9 @@ if (SDL_VERSION EQUAL "2")

include(FindPkgConfig) pkg_search_module(SDL2 sdl2) if (SDL2_FOUND) - set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIRS}) - set(SDL_LIBRARY ${SDL2_LIBRARIES}) - set(SDLMAIN_LIBRARY "") + set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIRS} CACHE INTERNAL "") + set(SDL_LIBRARY ${SDL2_LIBRARIES} CACHE INTERNAL "") + set(SDLMAIN_LIBRARY "" CACHE INTERNAL "") link_directories(${SDL2_LIBDIR}) endif() endif()
M src/platform/windows/memory.csrc/platform/windows/memory.c

@@ -1,6 +1,6 @@

#include "util/memory.h" -#include <Windows.h> +#include <windows.h> void* anonymousMemoryMap(size_t size) { return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
M src/util/vfs.csrc/util/vfs.c

@@ -10,7 +10,7 @@ #include <sys/mman.h>

#define PATH_SEP '/' #else #include <io.h> -#include <Windows.h> +#include <windows.h> #define PATH_SEP '\\' #endif