Merge branch 'master' into medusa

This commit is contained in:
Vicki Pfau 2020-07-28 16:20:54 -07:00
commit 4cfc7bcf22
7 changed files with 20 additions and 5 deletions

View File

@ -82,6 +82,7 @@ Other fixes:
- Qt: Add missing option for Wisdom Tree in overrides list
- Util: Fix crash if PNG header fails to write
- SM83: Simplify register pair access on big endian
- Wii: Fix pixelated filtering on interframe blending (fixes mgba.io/i/1830)
Misc:
- Debugger: Keep track of global cycle count
- FFmpeg: Add looping option for GIF/APNG

View File

@ -20,12 +20,15 @@ if(NOT MSVC)
set(CMAKE_C_EXTENSIONS ON)
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-missing-field-initializers")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-missing-field-initializers")
if(WIN32)
# mingw32 likes to complain about using the "wrong" format strings despite them actually working
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format")
endif()
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146 /wd4267")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146 /wd4267")
endif()
if(NOT DEFINED LIBMGBA_ONLY)
@ -170,10 +173,12 @@ set(PGO_POST_FLAGS "-fprofile-use=${PGO_DIR} -fbranch-probabilities")
if(BUILD_PGO AND NOT PGO_STAGE_2)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${PGO_PRE_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${PGO_PRE_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PGO_PRE_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PGO_PRE_FLAGS}")
elseif(BUILD_PGO AND PGO_STAGE_2)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${PGO_POST_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${PGO_POST_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PGO_POST_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PGO_POST_FLAGS}")
endif()
@ -249,7 +254,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*")
enable_language(ASM)
endif()
if(PSP2 OR WII)
if(PSP2)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format")
endif()

View File

@ -182,7 +182,7 @@ void mVideoLoggerRendererWriteVideoRegister(struct mVideoLogger* logger, uint32_
}
void mVideoLoggerRendererWriteVRAM(struct mVideoLogger* logger, uint32_t address) {
int bit = 1 << (address >> 12);
int bit = 1U << (address >> 12);
if (logger->vramDirtyBitmap[address >> 17] & bit) {
return;
}

View File

@ -13,8 +13,8 @@
#include <mgba-util/arm-algo.h>
#include <mgba-util/memory.h>
#define DIRTY_SCANLINE(R, Y) R->scanlineDirty[Y >> 5] |= (1 << (Y & 0x1F))
#define CLEAN_SCANLINE(R, Y) R->scanlineDirty[Y >> 5] &= ~(1 << (Y & 0x1F))
#define DIRTY_SCANLINE(R, Y) R->scanlineDirty[Y >> 5] |= (1U << (Y & 0x1F))
#define CLEAN_SCANLINE(R, Y) R->scanlineDirty[Y >> 5] &= ~(1U << (Y & 0x1F))
static void GBAVideoSoftwareRendererInit(struct GBAVideoRenderer* renderer);
static void GBAVideoSoftwareRendererDeinit(struct GBAVideoRenderer* renderer);
@ -536,7 +536,7 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render
softwareRenderer->nextY = y + 1;
}
bool dirty = softwareRenderer->scanlineDirty[y >> 5] & (1 << (y & 0x1F));
bool dirty = softwareRenderer->scanlineDirty[y >> 5] & (1U << (y & 0x1F));
if (memcmp(softwareRenderer->nextIo, softwareRenderer->cache[y].io, sizeof(softwareRenderer->nextIo))) {
memcpy(softwareRenderer->cache[y].io, softwareRenderer->nextIo, sizeof(softwareRenderer->nextIo));
dirty = true;

View File

@ -270,6 +270,10 @@ static void testToPath(const char* testName, char* path) {
++i;
}
}
if (i == PATH_MAX) {
--i;
}
path[i] = '\0';
}
static void _loadConfigTree(struct Table* configTree, const char* testName) {

View File

@ -877,9 +877,11 @@ void _unpaused(struct mGUIRunner* runner) {
case FM_LINEAR_2x:
default:
GX_InitTexObjFilterMode(&tex, GX_NEAR, GX_NEAR);
GX_InitTexObjFilterMode(&interframeTex, GX_NEAR, GX_NEAR);
break;
case FM_LINEAR_1x:
GX_InitTexObjFilterMode(&tex, GX_LINEAR, GX_LINEAR);
GX_InitTexObjFilterMode(&interframeTex, GX_LINEAR, GX_LINEAR);
break;
}
}
@ -1071,9 +1073,11 @@ void _incrementScreenMode(struct mGUIRunner* runner) {
case FM_LINEAR_2x:
default:
GX_InitTexObjFilterMode(&tex, GX_NEAR, GX_NEAR);
GX_InitTexObjFilterMode(&interframeTex, GX_NEAR, GX_NEAR);
break;
case FM_LINEAR_1x:
GX_InitTexObjFilterMode(&tex, GX_LINEAR, GX_LINEAR);
GX_InitTexObjFilterMode(&interframeTex, GX_LINEAR, GX_LINEAR);
break;
}
}

View File

@ -70,6 +70,7 @@ if(UNIX)
add_library(discord-rpc STATIC ${BASE_RPC_SRC})
target_link_libraries(discord-rpc PUBLIC pthread)
target_compile_options(discord-rpc PRIVATE -Wno-unknown-pragmas)
if (${WARNINGS_AS_ERRORS})
target_compile_options(discord-rpc PRIVATE -Werror)