mirror of https://github.com/mgba-emu/mgba.git
Merge branch 'master' into port/qt
This commit is contained in:
commit
f98d6486ef
|
@ -96,7 +96,7 @@ endif()
|
|||
# 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()
|
||||
|
|
|
@ -318,7 +318,7 @@ static void _unHuffman(struct GBA* gba, uint32_t source, uint32_t* dest) {
|
|||
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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#define PATH_SEP '/'
|
||||
#else
|
||||
#include <io.h>
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#define PATH_SEP '\\'
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue