mirror of
https://github.com/visualboyadvance-m/visualboyadvance-m
synced 2025-10-05 23:52:49 +02:00
Compare commits
11 Commits
32622efc1e
...
ede668b712
Author | SHA1 | Date | |
---|---|---|---|
|
ede668b712 | ||
|
5bd8904746 | ||
|
46326939eb | ||
|
3f005837dd | ||
|
2b3edb266a | ||
|
8e5fc43dd6 | ||
|
362ca53cbe | ||
|
9dc10ff6c4 | ||
|
ab01be3373 | ||
|
6ec0ba0610 | ||
|
9fcc0ad7a8 |
@@ -2,6 +2,8 @@ if(TRANSLATIONS_ONLY)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# TODO: Use compiler CPU not CMake.
|
||||
|
||||
if(NOT CMAKE_SYSTEM_PROCESSOR)
|
||||
if(NOT CMAKE_TOOLCHAIN_FILE AND CMAKE_HOST_SYSTEM_PROCESSOR)
|
||||
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
@@ -71,14 +73,6 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "[aA][aA][rR][cC][hH]|[aA][rR][mM]")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(DEFINED VCPKG_TARGET_TRIPLET)
|
||||
string(REGEX MATCH "^[^-]+" target_arch ${VCPKG_TARGET_TRIPLET})
|
||||
|
||||
if(NOT WINARCH STREQUAL target_arch)
|
||||
message(FATAL_ERROR "Wrong build environment architecture for VCPKG_TARGET_TRIPLET, you specified ${target_arch} but your compiler is for ${WINARCH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# We do not support amd64 asm yet
|
||||
if(X86_64 AND (ENABLE_ASM_CORE OR ENABLE_ASM_SCALERS OR ENABLE_MMX))
|
||||
message(FATAL_ERROR "The options ASM_CORE, ASM_SCALERS and MMX are not supported on X86_64 yet.")
|
||||
|
@@ -97,6 +97,11 @@ endmacro()
|
||||
|
||||
# Check for cached results. If there are skip the costly part.
|
||||
if (NOT FFMPEG_LIBRARIES)
|
||||
set(x265_lib "x265")
|
||||
|
||||
if(CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg" AND FFMPEG_STATIC)
|
||||
set(x265_lib "x265-static")
|
||||
endif()
|
||||
|
||||
# Check for all possible component.
|
||||
find_component(AVFORMAT libavformat avformat libavformat/avformat.h)
|
||||
@@ -108,7 +113,7 @@ if (NOT FFMPEG_LIBRARIES)
|
||||
find_component(POSTPROC libpostproc postproc libpostproc/postprocess.h)
|
||||
find_component(SWRESAMPLE libswresample swresample libswresample/swresample.h)
|
||||
find_component(X264 x264 x264 x264.h)
|
||||
find_component(X265 x265 x265 x265.h)
|
||||
find_component(X265 x265 "${x265_lib}" x265.h)
|
||||
|
||||
# Check if the required components were found and add their stuff to the FFMPEG_* vars.
|
||||
foreach (_component ${FFmpeg_FIND_COMPONENTS})
|
||||
|
@@ -40,7 +40,7 @@ if(VBAM_STATIC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg" AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^([xX]86_64|[aA][mM][dD]64)$")
|
||||
if(CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg")
|
||||
set(PKG_CONFIG_EXECUTABLE "$ENV{VCPKG_ROOT}/installed/x64-windows/tools/pkgconf/pkgconf.exe")
|
||||
endif()
|
||||
|
||||
@@ -76,6 +76,18 @@ option(ENABLE_LZMA "Enable LZMA archive support" ON)
|
||||
if(ENABLE_SDL3)
|
||||
set(CMAKE_C_FLAGS "-DENABLE_SDL3 ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "-DENABLE_SDL3 ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
include(CheckSourceCompiles)
|
||||
check_source_compiles(CXX
|
||||
"#include <SDL3/SDL.h>
|
||||
|
||||
int main() { return SDL_SCALEMODE_PIXELART; }
|
||||
" HAVE_SDL_SCALEMODE_PIXELART)
|
||||
|
||||
if(HAVE_SDL_SCALEMODE_PIXELART)
|
||||
set(CMAKE_C_FLAGS "-DHAVE_SDL3_PIXELART ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "-DHAVE_SDL3_PIXELART ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(DISABLE_OPENGL)
|
||||
|
462
po/wxvbam/bg.po
462
po/wxvbam/bg.po
File diff suppressed because it is too large
Load Diff
462
po/wxvbam/br.po
462
po/wxvbam/br.po
File diff suppressed because it is too large
Load Diff
462
po/wxvbam/cs.po
462
po/wxvbam/cs.po
File diff suppressed because it is too large
Load Diff
462
po/wxvbam/el.po
462
po/wxvbam/el.po
File diff suppressed because it is too large
Load Diff
430
po/wxvbam/es.po
430
po/wxvbam/es.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
462
po/wxvbam/gl.po
462
po/wxvbam/gl.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
430
po/wxvbam/id.po
430
po/wxvbam/id.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
462
po/wxvbam/ja.po
462
po/wxvbam/ja.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
462
po/wxvbam/nb.po
462
po/wxvbam/nb.po
File diff suppressed because it is too large
Load Diff
462
po/wxvbam/nl.po
462
po/wxvbam/nl.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
440
po/wxvbam/sv.po
440
po/wxvbam/sv.po
File diff suppressed because it is too large
Load Diff
462
po/wxvbam/tr.po
462
po/wxvbam/tr.po
File diff suppressed because it is too large
Load Diff
430
po/wxvbam/uk.po
430
po/wxvbam/uk.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#include <sys/param.h>
|
||||
#define fopen64 fopen
|
||||
#define fseeko64 fseeko
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "core/base/file_util.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if defined(__MUSL__) || defined(__APPLE__) || defined(BSD) || defined(__NetBSD__)
|
||||
#if defined(__MUSL__) || defined(__APPLE__) || defined(BSD)
|
||||
typedef off_t __off64_t; /* off_t is 64 bits on BSD. */
|
||||
#define fseeko64 fseeko
|
||||
#define ftello64 ftello
|
||||
|
@@ -37,21 +37,21 @@
|
||||
#else
|
||||
|
||||
// swaps a 16-bit value
|
||||
static inline uint16_t swap16(uint16_t v)
|
||||
static inline uint16_t vbswap16(uint16_t v)
|
||||
{
|
||||
return (v << 8) | (v >> 8);
|
||||
}
|
||||
|
||||
// swaps a 32-bit value
|
||||
static inline uint32_t swap32(uint32_t v)
|
||||
static inline uint32_t vbswap32(uint32_t v)
|
||||
{
|
||||
return (v << 24) | ((v << 8) & 0xff0000) | ((v >> 8) & 0xff00) | (v >> 24);
|
||||
}
|
||||
|
||||
#define READ16LE(x) swap16(*((uint16_t *)(x)))
|
||||
#define READ32LE(x) swap32(*((uint32_t *)(x)))
|
||||
#define WRITE16LE(x, v) *((uint16_t *)x) = swap16((v))
|
||||
#define WRITE32LE(x, v) *((uint32_t *)x) = swap32((v))
|
||||
#define READ16LE(x) vbswap16(*((uint16_t *)(x)))
|
||||
#define READ32LE(x) vbswap32(*((uint32_t *)(x)))
|
||||
#define WRITE16LE(x, v) *((uint16_t *)x) = vbswap16((v))
|
||||
#define WRITE32LE(x, v) *((uint32_t *)x) = vbswap32((v))
|
||||
#endif
|
||||
#else
|
||||
#define READ16LE(x) *((uint16_t *)x)
|
||||
|
@@ -877,7 +877,7 @@ BoolInt CPU_IsSupported_AES (void) { return APPLE_CRYPTO_SUPPORT_VAL; }
|
||||
|
||||
#ifdef USE_HWCAP
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
static unsigned long MY_getauxval(int aux)
|
||||
{
|
||||
unsigned long val;
|
||||
|
@@ -129,7 +129,9 @@ wchar etoupperw(wchar ch)
|
||||
{
|
||||
if (ch=='i')
|
||||
return('I');
|
||||
#if defined(__APPLE__) || defined(_MSC_VER) || defined(__MINGW32__) || defined(__linux__)
|
||||
#if defined(__APPLE__) || defined(_MSC_VER) || defined(__MINGW32__) || \
|
||||
defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
|
||||
defined(__OpenBSD__)
|
||||
return(toupper(ch));
|
||||
#else
|
||||
return(toupperw(ch));
|
||||
@@ -234,7 +236,9 @@ bool LowAscii(const wchar *Str)
|
||||
|
||||
int wcsicompc(const wchar *Str1,const wchar *Str2)
|
||||
{
|
||||
#if defined(_UNIX) || defined(_MSC_VER) || defined(__APPLE__) || defined(__linux__)
|
||||
#if defined(_UNIX) || defined(_MSC_VER) || defined(__APPLE__) || \
|
||||
defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
|
||||
defined(__OpenBSD__)
|
||||
return my_wcscmp(Str1,Str2);
|
||||
#elif defined(__MINGW32__)
|
||||
return _wcsicmp(Str1,Str2);
|
||||
|
@@ -151,6 +151,7 @@ std::array<Option, kNbOptions>& Option::All() {
|
||||
struct OwnedOptions {
|
||||
/// Display
|
||||
bool bilinear = true;
|
||||
bool sdl_pixel_art = false;
|
||||
Filter filter = Filter::kNone;
|
||||
wxString filter_plugin = wxEmptyString;
|
||||
Interframe interframe = Interframe::kNone;
|
||||
@@ -280,6 +281,7 @@ std::array<Option, kNbOptions>& Option::All() {
|
||||
static std::array<Option, kNbOptions> g_all_opts = {
|
||||
/// Display
|
||||
Option(OptionID::kDispBilinear, &g_owned_opts.bilinear),
|
||||
Option(OptionID::kDispSDLPixelArt, &g_owned_opts.sdl_pixel_art),
|
||||
Option(OptionID::kDispFilter, &g_owned_opts.filter),
|
||||
Option(OptionID::kDispFilterPlugin, &g_owned_opts.filter_plugin),
|
||||
Option(OptionID::kDispIFB, &g_owned_opts.interframe),
|
||||
@@ -427,6 +429,7 @@ namespace internal {
|
||||
const std::array<OptionData, kNbOptions + 1> kAllOptionsData = {
|
||||
/// Display
|
||||
OptionData{"Display/Bilinear", "Bilinear", _("Use bilinear filter with 3d renderer")},
|
||||
OptionData{"Display/SDLPixelArt", "SDLPixelArt", _("Use the SDL pixel art filter with an SDL renderer")},
|
||||
OptionData{"Display/Filter", "", _("Full-screen filter to apply")},
|
||||
OptionData{"Display/FilterPlugin", "", _("Filter plugin library")},
|
||||
OptionData{"Display/IFB", "", _("Interframe blending function")},
|
||||
|
@@ -8,6 +8,7 @@ namespace config {
|
||||
enum class OptionID {
|
||||
/// Display
|
||||
kDispBilinear = 0,
|
||||
kDispSDLPixelArt,
|
||||
kDispFilter,
|
||||
kDispFilterPlugin,
|
||||
kDispIFB,
|
||||
|
@@ -12,6 +12,7 @@ namespace config {
|
||||
static constexpr std::array<Option::Type, kNbOptions> kOptionsTypes = {
|
||||
/// Display
|
||||
/*kDispBilinear*/ Option::Type::kBool,
|
||||
/*kDispSDLPixelArt*/ Option::Type::kBool,
|
||||
/*kDispFilter*/ Option::Type::kFilter,
|
||||
/*kDispFilterPlugin*/ Option::Type::kString,
|
||||
/*kDispIFB*/ Option::Type::kInterframe,
|
||||
|
@@ -386,6 +386,14 @@ DisplayConfig::DisplayConfig(wxWindow* parent)
|
||||
sdlrenderer_selector_ = GetValidatedChild<wxChoice>("SDLRenderer");
|
||||
sdlrenderer_selector_->SetValidator(SDLDevicesValidator());
|
||||
|
||||
#if !defined(ENABLE_SDL3) || !defined(HAVE_SDL3_PIXELART)
|
||||
GetValidatedChild<wxCheckBox>("SDLPixelArt")->Hide();
|
||||
#else
|
||||
GetValidatedChild<wxCheckBox>("SDLPixelArt")
|
||||
->SetValidator(
|
||||
widgets::OptionBoolValidator(config::OptionID::kDispSDLPixelArt));
|
||||
#endif
|
||||
|
||||
wxWindow* color_profile_srgb = GetValidatedChild("ColorProfileSRGB");
|
||||
color_profile_srgb->SetValidator(
|
||||
ColorCorrectionProfileValidator(config::ColorCorrectionProfile::kSRGB));
|
||||
|
@@ -2574,6 +2574,17 @@ SDL_TEXTUREACCESS_STREAMING, (width * scale), (height * scale));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Set bilinear or nearest on the texture.
|
||||
#ifdef ENABLE_SDL3
|
||||
#ifdef HAVE_SDL3_PIXELART
|
||||
SDL_SetTextureScaleMode(texture, OPTION(kDispSDLPixelArt) ? SDL_SCALEMODE_PIXELART : OPTION(kDispBilinear) ? SDL_SCALEMODE_LINEAR : SDL_SCALEMODE_NEAREST);
|
||||
#else
|
||||
SDL_SetTextureScaleMode(texture, OPTION(kDispBilinear) ? SDL_SCALEMODE_LINEAR : SDL_SCALEMODE_NEAREST);
|
||||
#endif
|
||||
#else
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, OPTION(kDispBilinear) ? "1" : "0");
|
||||
#endif
|
||||
|
||||
did_init = true;
|
||||
}
|
||||
|
@@ -170,6 +170,13 @@
|
||||
<flag>wxALL|wxEXPAND</flag>
|
||||
<border>5</border>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<object class="wxCheckBox" name="SDLPixelArt">
|
||||
<label>SDL Pixel Art Filter</label>
|
||||
</object>
|
||||
<flag>wxALL|wxEXPAND</flag>
|
||||
<border>5</border>
|
||||
</object>
|
||||
<cols>2</cols>
|
||||
<growablecols>1</growablecols>
|
||||
</object>
|
||||
|
@@ -88,7 +88,7 @@ endif()
|
||||
if(UNIX OR APPLE)
|
||||
target_link_libraries(sfml-system PRIVATE pthread)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(UNIX AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
|
||||
target_link_libraries(sfml-system PRIVATE rt)
|
||||
elseif(WIN32)
|
||||
target_link_libraries(sfml-system PRIVATE winmm)
|
||||
|
Reference in New Issue
Block a user