mirror of https://github.com/stella-emu/stella.git
Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
2128ceb81a | |
![]() |
01702f1230 | |
![]() |
3dbdcd0682 |
|
@ -28,7 +28,7 @@ jobs:
|
|||
steps:
|
||||
- uses: maxim-lobanov/setup-xcode@v1
|
||||
with:
|
||||
xcode-version: '16.2'
|
||||
xcode-version: '15.4'
|
||||
- name: Check out the repository
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
|
||||
- name: Install SDL2
|
||||
|
|
|
@ -5,7 +5,6 @@ src/**/*.so
|
|||
src/**/*.dylib
|
||||
src/**/*.dll
|
||||
src/**/*.o
|
||||
src/**/*.d
|
||||
src/**/*.obj
|
||||
src/**/*.tlog
|
||||
out
|
||||
|
@ -44,4 +43,3 @@ a.out
|
|||
*.json
|
||||
*.sqlite3
|
||||
*.bak
|
||||
debian/files
|
||||
|
|
|
@ -28,7 +28,7 @@ distributions currently available are:
|
|||
Stella-7.0-x64.exe (64-bit EXE installer)
|
||||
Stella-7.0-windows.zip (64 bit ZIP version)
|
||||
|
||||
* Binary distribution for macOS 10.13 and above :
|
||||
* Binary distribution for macOS 10.12 and above :
|
||||
Stella-7.0-macos.dmg (ARM M1 and 64-bit Intel)
|
||||
|
||||
* Binary distribution for 64-bit Ubuntu :
|
||||
|
|
|
@ -12,14 +12,6 @@
|
|||
Release History
|
||||
===========================================================================
|
||||
|
||||
7.0 to 7.1 (xxx x, 202x)
|
||||
|
||||
* Added developer option for disabling PlusROM support (TODO: Doc)
|
||||
|
||||
* Enhanced PAL-60 detection, searches for signature (e.g. PAL60) in ROM
|
||||
|
||||
* Enhanced VSYNC emulation, considers VBLANK now too
|
||||
|
||||
6.7.1 to 7.0 (October 5, 2024)
|
||||
|
||||
* Enhanced ROM launcher to allow multiple images per ROM.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
License Information and Copyright Notice
|
||||
===========================================================================
|
||||
|
||||
Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony and the
|
||||
Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony and the
|
||||
Stella Team
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
|
|
2
Makefile
2
Makefile
|
@ -8,7 +8,7 @@
|
|||
## SS SS tt ee ll ll aa aa
|
||||
## SSSS ttt eeeee llll llll aaaaa
|
||||
##
|
||||
## Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
## Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
## and the Stella Team
|
||||
##
|
||||
## See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -45,7 +45,6 @@ _ranlib=ranlib
|
|||
_install=install
|
||||
_ar="ar cru"
|
||||
_strip=strip
|
||||
_pkg_config=pkg-config
|
||||
_mkdir="mkdir -p"
|
||||
_echo=printf
|
||||
_cat=cat
|
||||
|
@ -344,17 +343,12 @@ mingw32-cross)
|
|||
_host_cpu=i386
|
||||
_host_prefix=i386-mingw32msvc
|
||||
;;
|
||||
"")
|
||||
*)
|
||||
guessed_host=`$_srcdir/config.guess`
|
||||
_host_cpu=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
_host_os=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
_host_vendor=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
;;
|
||||
*)
|
||||
_host_cpu=`echo "$_host" | sed 's/^\([^-]*\)-.*/\1/'`
|
||||
_host_os=`echo "$_host" | sed 's/-\([^-]*\)-[^-]*$/\1/'`
|
||||
_host_prefix="$_host"
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
|
@ -632,9 +626,6 @@ fi
|
|||
# Cross-compilers use their own commands for the following functions
|
||||
if test -n "$_host_prefix"; then
|
||||
_strip="$_host_prefix-$_strip"
|
||||
if command -v "$_host_prefix-$_pkg_config" >/dev/null 2>&1; then
|
||||
_pkg_config="$_host_prefix-$_pkg_config"
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
|
@ -648,7 +639,7 @@ if test "$_build_zip" = yes ; then
|
|||
#include <zlib.h>
|
||||
int main(void) { return strcmp(ZLIB_VERSION, zlibVersion()); }
|
||||
EOF
|
||||
cc_check $LDFLAGS $CXXFLAGS $ZLIB_CFLAGS $ZLIB_LIBS `$_pkg_config --libs zlib` && _zlib=yes
|
||||
cc_check $LDFLAGS $CXXFLAGS $ZLIB_CFLAGS $ZLIB_LIBS `pkg-config --libs zlib` && _zlib=yes
|
||||
|
||||
if test "$_zlib" = yes ; then
|
||||
echo "$_zlib"
|
||||
|
@ -674,7 +665,7 @@ if test "$_build_png" = yes ; then
|
|||
#include <png.h>
|
||||
int main(void) { return printf("%s\n", PNG_HEADER_VERSION_STRING); }
|
||||
EOF
|
||||
cc_check $LDFLAGS $CXXFLAGS $LIBPNG_CFLAGS $LIBPNG_LIBS `$_pkg_config --libs libpng` && _libpng=yes
|
||||
cc_check $LDFLAGS $CXXFLAGS $LIBPNG_CFLAGS $LIBPNG_LIBS `pkg-config --libs libpng` && _libpng=yes
|
||||
|
||||
if test "$_libpng" = yes ; then
|
||||
echo "$_libpng"
|
||||
|
@ -698,7 +689,7 @@ if test "$_build_sqlite3" = yes ; then
|
|||
#include <sqlite3.h>
|
||||
int main(void) { return printf("%s\n", SQLITE_VERSION); }
|
||||
EOF
|
||||
cc_check $LDFLAGS $CXXFLAGS `$_pkg_config --libs sqlite3` && _libsqlite3=yes
|
||||
cc_check $LDFLAGS $CXXFLAGS `pkg-config --libs sqlite3` && _libsqlite3=yes
|
||||
|
||||
if test "$_libsqlite3" = yes ; then
|
||||
echo "$_libsqlite3"
|
||||
|
@ -931,7 +922,7 @@ if test "$_build_png" = yes ; then
|
|||
INCLUDES="$INCLUDES -I$LIBJPG -I$LIBJPGEXIF"
|
||||
MODULES="$MODULES $LIBJPGEXIF"
|
||||
if test "$_libpng" = yes ; then
|
||||
LIBS="$LIBS `$_pkg_config --libs libpng`"
|
||||
LIBS="$LIBS `pkg-config --libs libpng`"
|
||||
else
|
||||
MODULES="$MODULES $LIBPNG"
|
||||
INCLUDES="$INCLUDES -I$LIBPNG"
|
||||
|
@ -939,7 +930,7 @@ if test "$_build_png" = yes ; then
|
|||
fi
|
||||
|
||||
if test "$_libsqlite3" = yes ; then
|
||||
LIBS="$LIBS `$_pkg_config --libs sqlite3`"
|
||||
LIBS="$LIBS `pkg-config --libs sqlite3`"
|
||||
else
|
||||
MODULES="$MODULES $SQLITE_LIB"
|
||||
INCLUDES="$INCLUDES -I$SQLITE_LIB"
|
||||
|
@ -948,7 +939,7 @@ fi
|
|||
if test "$_build_zip" = yes ; then
|
||||
DEFINES="$DEFINES -DZIP_SUPPORT"
|
||||
if test "$_zlib" = yes ; then
|
||||
LIBS="$LIBS `$_pkg_config --libs zlib`"
|
||||
LIBS="$LIBS `pkg-config --libs zlib`"
|
||||
else
|
||||
MODULES="$MODULES $ZLIB"
|
||||
INCLUDES="$INCLUDES -I$ZLIB"
|
||||
|
|
|
@ -3,7 +3,6 @@ Maintainer: Stephen Anthony <sa666666@gmail.com>
|
|||
Section: otherosfs
|
||||
Priority: optional
|
||||
Build-Depends: debhelper (>= 10~),
|
||||
libgtest-dev,
|
||||
libpng-dev,
|
||||
libsdl2-dev,
|
||||
zlib1g-dev
|
||||
|
@ -19,7 +18,7 @@ Depends: ${misc:Depends},
|
|||
${shlibs:Depends}
|
||||
Recommends: joystick (>= 1:1.5.1)
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Description: Atari 2600 Emulator for SDL
|
||||
Description: Atari 2600 Emulator for SDL2
|
||||
Stella is a portable emulator of the old Atari 2600 video-game
|
||||
console. You can play most Atari 2600 games with it.
|
||||
.
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0
|
||||
Upstream-Name: stella
|
||||
Source: https://stella-emu.github.io
|
||||
Copyright: 1995-2025 Bradford W. Mott, Stephen Anthony and the Stella Team
|
||||
Copyright: 1995-2024 Bradford W. Mott, Stephen Anthony and the Stella Team
|
||||
License: GPL-2+
|
||||
|
||||
Files: *
|
||||
Copyright: 1995-2025 Bradford W. Mott, Stephen Anthony and the Stella
|
||||
Copyright: 1995-2024 Bradford W. Mott, Stephen Anthony and the Stella
|
||||
Team
|
||||
License: GPL-2+
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 1998-2004 Tom Lear <tom@trap.mtview.ca.us>
|
||||
2006 Mario Iseli <admin@marioiseli.com>
|
||||
2010-2025 Stephen Kitt <skitt@debian.org>
|
||||
2010-2024 Stephen Kitt <skitt@debian.org>
|
||||
License: GPL-2+
|
||||
|
||||
Files:
|
||||
|
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
@ -368,9 +368,9 @@
|
|||
<p>The Mac version of Stella is designed to work on an Apple Macintosh with
|
||||
the following:</p>
|
||||
<ul>
|
||||
<li>macOS 10.13 or above</li>
|
||||
<li>macOS 10.11 or above</li>
|
||||
<li>64-bit ARM or Intel processor</li>
|
||||
<li>Xcode 16.0 is required to compile the Stella source code</li>
|
||||
<li>Xcode 13.0 is required to compile the Stella source code</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
|
@ -2526,7 +2526,7 @@
|
|||
|
||||
<br>
|
||||
<p><h2>
|
||||
<a name="HighScores">High Scores Saving</a></h2>
|
||||
<a name="Highscores">High Scores Saving</a></h2>
|
||||
<blockquote>
|
||||
|
||||
<p>Stella allows the user to save high scores when the required definitions
|
||||
|
|
|
@ -264,7 +264,7 @@
|
|||
<td width="41%">This dialog is similar to the PC version's
|
||||
<a href="index.html#CommandMenu"><b>Command Menu</b></a>, but with some
|
||||
commands especially selected for the RetroN 77.</td>
|
||||
<td><p><img src="graphics/commandsmenu_r77.png"></p></td>
|
||||
<td><p><img src="commandsmenu_r77.png"></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
|
@ -309,7 +309,7 @@
|
|||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td><p><img src="graphics/basic_settings.png"></p></td>
|
||||
<td><p><img src="basic_settings.png"></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -33,7 +33,7 @@ BankRomCheat::BankRomCheat(OSystem& os, string_view name, string_view code)
|
|||
count = static_cast<uInt8>(BSPF::stoi<16>(myCode.substr(7, 1)) + 1);
|
||||
|
||||
// Back up original data; we need this if the cheat is ever disabled
|
||||
for(int i = 0; std::cmp_less(i, count); ++i)
|
||||
for(int i = 0; i < count; ++i)
|
||||
savedRom[i] = myOSystem.console().cartridge().peek(address + i);
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ bool BankRomCheat::disable()
|
|||
const int oldBank = myOSystem.console().cartridge().getBank(address);
|
||||
myOSystem.console().cartridge().bank(bank);
|
||||
|
||||
for(int i = 0; std::cmp_less(i, count); ++i)
|
||||
for(int i = 0; i < count; ++i)
|
||||
myOSystem.console().cartridge().patch(address + i, savedRom[i]);
|
||||
|
||||
myOSystem.console().cartridge().bank(oldBank);
|
||||
|
@ -66,7 +66,7 @@ void BankRomCheat::evaluate()
|
|||
const int oldBank = myOSystem.console().cartridge().getBank(address);
|
||||
myOSystem.console().cartridge().bank(bank);
|
||||
|
||||
for(int i = 0; std::cmp_less(i, count); ++i)
|
||||
for(int i = 0; i < count; ++i)
|
||||
myOSystem.console().cartridge().patch(address + i, value);
|
||||
|
||||
myOSystem.console().cartridge().bank(oldBank);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -28,7 +28,7 @@ CheetahCheat::CheetahCheat(OSystem& os, string_view name, string_view code)
|
|||
count{static_cast<uInt8>(BSPF::stoi<16>(code.substr(5, 1)) + 1)}
|
||||
{
|
||||
// Back up original data; we need this if the cheat is ever disabled
|
||||
for(uInt8 i = 0; i < count; ++i)
|
||||
for(int i = 0; i < count; ++i)
|
||||
savedRom[i] = myOSystem.console().cartridge().peek(address + i);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ bool CheetahCheat::enable()
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CheetahCheat::disable()
|
||||
{
|
||||
for(uInt8 i = 0; i < count; ++i)
|
||||
for(int i = 0; i < count; ++i)
|
||||
myOSystem.console().cartridge().patch(address + i, savedRom[i]);
|
||||
|
||||
return myEnabled = false;
|
||||
|
@ -53,7 +53,7 @@ void CheetahCheat::evaluate()
|
|||
{
|
||||
if(!myEnabled)
|
||||
{
|
||||
for(uInt8 i = 0; i < count; ++i)
|
||||
for(int i = 0; i < count; ++i)
|
||||
myOSystem.console().cartridge().patch(address + i, value);
|
||||
|
||||
myEnabled = true;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -46,7 +46,6 @@ void DevSettingsHandler::loadSettings(SettingsSet set)
|
|||
// AtariVox/SaveKey/PlusROM access
|
||||
myExternAccess[set] = settings.getBool(prefix + "extaccess");
|
||||
myConsole[set] = settings.getString(prefix + "console") == "7800" ? 1 : 0;
|
||||
myPlusROM[set] = devSettings ? settings.getBool("dev.plusroms.on") : true;
|
||||
// Randomization
|
||||
myRandomBank[set] = settings.getBool(prefix + "bankrandom");
|
||||
myRandomizeTIA[set] = settings.getBool(prefix + "tiarandom");
|
||||
|
@ -119,7 +118,6 @@ void DevSettingsHandler::saveSettings(SettingsSet set)
|
|||
|
||||
if(devSettings)
|
||||
{
|
||||
settings.setValue("dev.plusroms.on", myPlusROM[set]);
|
||||
settings.setValue("dev.hsrandom", myRandomHotspots[set]);
|
||||
// Undriven TIA pins
|
||||
settings.setValue("dev.tiadriven", myUndrivenPins[set]);
|
||||
|
@ -185,7 +183,6 @@ void DevSettingsHandler::applySettings(SettingsSet set)
|
|||
{
|
||||
myOSystem.console().cartridge().enableRandomHotspots(myRandomHotspots[set]);
|
||||
myOSystem.console().tia().driveUnusedPinsRandom(myUndrivenPins[set]);
|
||||
myOSystem.console().cartridge().enablePlusROM(myPlusROM[set]);
|
||||
// Notes:
|
||||
// - thumb exceptions not updated, because set in cart constructor
|
||||
// - other missing settings are used on-the-fly
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -51,7 +51,6 @@ class DevSettingsHandler
|
|||
std::array<bool, numSets> myDetectedInfo{};
|
||||
std::array<bool, numSets> myExternAccess{};
|
||||
std::array<int, numSets> myConsole{};
|
||||
std::array<int, numSets> myPlusROM{};
|
||||
std::array<bool, numSets> myRandomBank{};
|
||||
std::array<bool, numSets> myRandomizeTIA{};
|
||||
std::array<bool, numSets> myRandomizeRAM{};
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -17,12 +17,12 @@
|
|||
|
||||
#include "Logger.hxx"
|
||||
#include "OSystem.hxx"
|
||||
#include "EventHandlerSDL.hxx"
|
||||
#include "EventHandlerSDL2.hxx"
|
||||
|
||||
#include "ThreadDebugging.hxx"
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
EventHandlerSDL::EventHandlerSDL(OSystem& osystem)
|
||||
EventHandlerSDL2::EventHandlerSDL2(OSystem& osystem)
|
||||
: EventHandler{osystem}
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
@ -45,14 +45,14 @@ EventHandlerSDL::EventHandlerSDL(OSystem& osystem)
|
|||
<< SDL_GetError() << '\n';
|
||||
Logger::error(buf.view());
|
||||
}
|
||||
Logger::debug("EventHandlerSDL::EventHandlerSDL SDL_INIT_JOYSTICK");
|
||||
Logger::debug("EventHandlerSDL2::EventHandlerSDL2 SDL_INIT_JOYSTICK");
|
||||
#endif
|
||||
|
||||
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
EventHandlerSDL::~EventHandlerSDL()
|
||||
EventHandlerSDL2::~EventHandlerSDL2()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -61,7 +61,7 @@ EventHandlerSDL::~EventHandlerSDL()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void EventHandlerSDL::enableTextEvents(bool enable)
|
||||
void EventHandlerSDL2::enableTextEvents(bool enable)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -72,13 +72,13 @@ void EventHandlerSDL::enableTextEvents(bool enable)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void EventHandlerSDL::copyText(const string& text) const
|
||||
void EventHandlerSDL2::copyText(const string& text) const
|
||||
{
|
||||
SDL_SetClipboardText(text.c_str());
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string EventHandlerSDL::pasteText(string& text) const
|
||||
string EventHandlerSDL2::pasteText(string& text) const
|
||||
{
|
||||
if(SDL_HasClipboardText())
|
||||
text = SDL_GetClipboardText();
|
||||
|
@ -89,7 +89,7 @@ string EventHandlerSDL::pasteText(string& text) const
|
|||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void EventHandlerSDL::pollEvent()
|
||||
void EventHandlerSDL2::pollEvent()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -192,7 +192,7 @@ void EventHandlerSDL::pollEvent()
|
|||
|
||||
case SDL_JOYDEVICEADDED:
|
||||
{
|
||||
addPhysicalJoystick(make_shared<JoystickSDL>(myEvent.jdevice.which));
|
||||
addPhysicalJoystick(make_shared<JoystickSDL2>(myEvent.jdevice.which));
|
||||
break; // SDL_JOYDEVICEADDED
|
||||
}
|
||||
case SDL_JOYDEVICEREMOVED:
|
||||
|
@ -261,7 +261,7 @@ void EventHandlerSDL::pollEvent()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
EventHandlerSDL::JoystickSDL::JoystickSDL(int idx)
|
||||
EventHandlerSDL2::JoystickSDL2::JoystickSDL2(int idx)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -285,7 +285,7 @@ EventHandlerSDL::JoystickSDL::JoystickSDL(int idx)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
EventHandlerSDL::JoystickSDL::~JoystickSDL()
|
||||
EventHandlerSDL2::JoystickSDL2::~JoystickSDL2()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
|
@ -8,15 +8,15 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//============================================================================
|
||||
|
||||
#ifndef EVENTHANDLER_SDL_HXX
|
||||
#define EVENTHANDLER_SDL_HXX
|
||||
#ifndef EVENTHANDLER_SDL2_HXX
|
||||
#define EVENTHANDLER_SDL2_HXX
|
||||
|
||||
#include "SDL_lib.hxx"
|
||||
#include "EventHandler.hxx"
|
||||
|
@ -24,19 +24,19 @@
|
|||
|
||||
/**
|
||||
This class handles event collection from the point of view of the specific
|
||||
backend toolkit (SDL). It converts from SDL-specific events into events
|
||||
backend toolkit (SDL2). It converts from SDL2-specific events into events
|
||||
that the Stella core can understand.
|
||||
|
||||
@author Stephen Anthony
|
||||
*/
|
||||
class EventHandlerSDL : public EventHandler
|
||||
class EventHandlerSDL2 : public EventHandler
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Create a new SDL event handler object
|
||||
Create a new SDL2 event handler object
|
||||
*/
|
||||
explicit EventHandlerSDL(OSystem& osystem);
|
||||
~EventHandlerSDL() override;
|
||||
explicit EventHandlerSDL2(OSystem& osystem);
|
||||
~EventHandlerSDL2() override;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
@ -51,7 +51,7 @@ class EventHandlerSDL : public EventHandler
|
|||
string pasteText(string& text) const override;
|
||||
|
||||
/**
|
||||
Collects and dispatches any pending SDL events.
|
||||
Collects and dispatches any pending SDL2 events.
|
||||
*/
|
||||
void pollEvent() override;
|
||||
|
||||
|
@ -60,31 +60,31 @@ class EventHandlerSDL : public EventHandler
|
|||
|
||||
// A thin wrapper around a basic PhysicalJoystick, holding the pointer to
|
||||
// the underlying SDL joystick device.
|
||||
class JoystickSDL : public PhysicalJoystick
|
||||
class JoystickSDL2 : public PhysicalJoystick
|
||||
{
|
||||
public:
|
||||
explicit JoystickSDL(int idx);
|
||||
virtual ~JoystickSDL();
|
||||
explicit JoystickSDL2(int idx);
|
||||
virtual ~JoystickSDL2();
|
||||
|
||||
private:
|
||||
SDL_Joystick* myStick{nullptr};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
JoystickSDL() = delete;
|
||||
JoystickSDL(const JoystickSDL&) = delete;
|
||||
JoystickSDL(JoystickSDL&&) = delete;
|
||||
JoystickSDL& operator=(const JoystickSDL&) = delete;
|
||||
JoystickSDL& operator=(JoystickSDL&&) = delete;
|
||||
JoystickSDL2() = delete;
|
||||
JoystickSDL2(const JoystickSDL2&) = delete;
|
||||
JoystickSDL2(JoystickSDL2&&) = delete;
|
||||
JoystickSDL2& operator=(const JoystickSDL2&) = delete;
|
||||
JoystickSDL2& operator=(JoystickSDL2&&) = delete;
|
||||
};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
EventHandlerSDL() = delete;
|
||||
EventHandlerSDL(const EventHandlerSDL&) = delete;
|
||||
EventHandlerSDL(EventHandlerSDL&&) = delete;
|
||||
EventHandlerSDL& operator=(const EventHandlerSDL&) = delete;
|
||||
EventHandlerSDL& operator=(EventHandlerSDL&&) = delete;
|
||||
EventHandlerSDL2() = delete;
|
||||
EventHandlerSDL2(const EventHandlerSDL2&) = delete;
|
||||
EventHandlerSDL2(EventHandlerSDL2&&) = delete;
|
||||
EventHandlerSDL2& operator=(const EventHandlerSDL2&) = delete;
|
||||
EventHandlerSDL2& operator=(EventHandlerSDL2&&) = delete;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -25,33 +25,33 @@
|
|||
#include "Settings.hxx"
|
||||
|
||||
#include "ThreadDebugging.hxx"
|
||||
#include "FBSurfaceSDL.hxx"
|
||||
#include "FBBackendSDL.hxx"
|
||||
#include "FBSurfaceSDL2.hxx"
|
||||
#include "FBBackendSDL2.hxx"
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
FBBackendSDL::FBBackendSDL(OSystem& osystem)
|
||||
FBBackendSDL2::FBBackendSDL2(OSystem& osystem)
|
||||
: myOSystem{osystem}
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
// Initialize SDL context
|
||||
// Initialize SDL2 context
|
||||
if(SDL_InitSubSystem(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0)
|
||||
{
|
||||
ostringstream buf;
|
||||
buf << "ERROR: Couldn't initialize SDL: " << SDL_GetError();
|
||||
throw runtime_error(buf.str());
|
||||
}
|
||||
Logger::debug("FBBackendSDL::FBBackendSDL SDL_Init()");
|
||||
Logger::debug("FBBackendSDL2::FBBackendSDL2 SDL_Init()");
|
||||
|
||||
// We need a pixel format for palette value calculations
|
||||
// It's done this way (vs directly accessing a FBSurfaceSDL object)
|
||||
// It's done this way (vs directly accessing a FBSurfaceSDL2 object)
|
||||
// since the structure may be needed before any FBSurface's have
|
||||
// been created
|
||||
myPixelFormat = SDL_AllocFormat(SDL_PIXELFORMAT_ARGB8888);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
FBBackendSDL::~FBBackendSDL()
|
||||
FBBackendSDL2::~FBBackendSDL2()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -73,9 +73,9 @@ FBBackendSDL::~FBBackendSDL()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBBackendSDL::queryHardware(vector<Common::Size>& fullscreenRes,
|
||||
vector<Common::Size>& windowedRes,
|
||||
VariantList& renderers)
|
||||
void FBBackendSDL2::queryHardware(vector<Common::Size>& fullscreenRes,
|
||||
vector<Common::Size>& windowedRes,
|
||||
VariantList& renderers)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -83,7 +83,7 @@ void FBBackendSDL::queryHardware(vector<Common::Size>& fullscreenRes,
|
|||
myNumDisplays = SDL_GetNumVideoDisplays();
|
||||
|
||||
// First get the maximum fullscreen desktop resolution
|
||||
SDL_DisplayMode display{};
|
||||
SDL_DisplayMode display;
|
||||
for(int i = 0; i < myNumDisplays; ++i)
|
||||
{
|
||||
SDL_GetDesktopDisplayMode(i, &display);
|
||||
|
@ -133,7 +133,7 @@ void FBBackendSDL::queryHardware(vector<Common::Size>& fullscreenRes,
|
|||
SDL_DestroyWindow(tmpWindow);
|
||||
}
|
||||
|
||||
SDL_Rect r{};
|
||||
SDL_Rect r;
|
||||
for(int i = 0; i < myNumDisplays; ++i)
|
||||
{
|
||||
// Display bounds minus dock
|
||||
|
@ -190,7 +190,7 @@ void FBBackendSDL::queryHardware(vector<Common::Size>& fullscreenRes,
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool FBBackendSDL::isCurrentWindowPositioned() const
|
||||
bool FBBackendSDL2::isCurrentWindowPositioned() const
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -199,18 +199,19 @@ bool FBBackendSDL::isCurrentWindowPositioned() const
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Common::Point FBBackendSDL::getCurrentWindowPos() const
|
||||
Common::Point FBBackendSDL2::getCurrentWindowPos() const
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
Common::Point pos;
|
||||
|
||||
SDL_GetWindowPosition(myWindow, &pos.x, &pos.y);
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Int32 FBBackendSDL::getCurrentDisplayIndex() const
|
||||
Int32 FBBackendSDL2::getCurrentDisplayIndex() const
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -218,8 +219,8 @@ Int32 FBBackendSDL::getCurrentDisplayIndex() const
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool FBBackendSDL::setVideoMode(const VideoModeHandler::Mode& mode,
|
||||
int winIdx, const Common::Point& winPos)
|
||||
bool FBBackendSDL2::setVideoMode(const VideoModeHandler::Mode& mode,
|
||||
int winIdx, const Common::Point& winPos)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -260,7 +261,7 @@ bool FBBackendSDL::setVideoMode(const VideoModeHandler::Mode& mode,
|
|||
}
|
||||
|
||||
#ifdef ADAPTABLE_REFRESH_SUPPORT
|
||||
SDL_DisplayMode adaptedSdlMode{};
|
||||
SDL_DisplayMode adaptedSdlMode;
|
||||
const int gameRefreshRate =
|
||||
myOSystem.hasConsole() ? myOSystem.console().gameRefreshRate() : 0;
|
||||
const bool shouldAdapt = fullScreen
|
||||
|
@ -286,9 +287,8 @@ bool FBBackendSDL::setVideoMode(const VideoModeHandler::Mode& mode,
|
|||
int w{0}, h{0};
|
||||
|
||||
SDL_GetWindowSize(myWindow, &w, &h);
|
||||
if(d != displayIndex ||
|
||||
std::cmp_not_equal(w, mode.screenS.w) ||
|
||||
std::cmp_not_equal(h, mode.screenS.h) || adaptRefresh)
|
||||
if(d != displayIndex || static_cast<uInt32>(w) != mode.screenS.w ||
|
||||
static_cast<uInt32>(h) != mode.screenS.h || adaptRefresh)
|
||||
{
|
||||
// Renderer has to be destroyed *before* the window gets destroyed to avoid memory leaks
|
||||
SDL_DestroyRenderer(myRenderer);
|
||||
|
@ -345,8 +345,8 @@ bool FBBackendSDL::setVideoMode(const VideoModeHandler::Mode& mode,
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool FBBackendSDL::adaptRefreshRate(Int32 displayIndex,
|
||||
SDL_DisplayMode& adaptedSdlMode)
|
||||
bool FBBackendSDL2::adaptRefreshRate(Int32 displayIndex,
|
||||
SDL_DisplayMode& adaptedSdlMode)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -374,7 +374,7 @@ bool FBBackendSDL::adaptRefreshRate(Int32 displayIndex,
|
|||
// Check for integer factors 1 (60/50 Hz) and 2 (120/100 Hz)
|
||||
for(int m = 1; m <= 2; ++m)
|
||||
{
|
||||
SDL_DisplayMode closestSdlMode{};
|
||||
SDL_DisplayMode closestSdlMode;
|
||||
|
||||
sdlMode.refresh_rate = wantedRefreshRate * m;
|
||||
if(SDL_GetClosestDisplayMode(displayIndex, &sdlMode, &closestSdlMode) == nullptr)
|
||||
|
@ -405,7 +405,7 @@ bool FBBackendSDL::adaptRefreshRate(Int32 displayIndex,
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool FBBackendSDL::createRenderer()
|
||||
bool FBBackendSDL2::createRenderer()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -416,7 +416,7 @@ bool FBBackendSDL::createRenderer()
|
|||
bool recreate = myRenderer == nullptr;
|
||||
uInt32 renderFlags = SDL_RENDERER_ACCELERATED;
|
||||
const string& video = myOSystem.settings().getString("video"); // Render hint
|
||||
SDL_RendererInfo renderInfo{};
|
||||
SDL_RendererInfo renderInfo;
|
||||
|
||||
if(myOSystem.settings().getBool("vsync")
|
||||
&& !myOSystem.settings().getBool("turbo")) // V'synced blits option
|
||||
|
@ -459,7 +459,7 @@ bool FBBackendSDL::createRenderer()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBBackendSDL::setTitle(string_view title)
|
||||
void FBBackendSDL2::setTitle(string_view title)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -470,7 +470,7 @@ void FBBackendSDL::setTitle(string_view title)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string FBBackendSDL::about() const
|
||||
string FBBackendSDL2::about() const
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -492,7 +492,7 @@ string FBBackendSDL::about() const
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBBackendSDL::showCursor(bool show)
|
||||
void FBBackendSDL2::showCursor(bool show)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -500,7 +500,7 @@ void FBBackendSDL::showCursor(bool show)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBBackendSDL::grabMouse(bool grab)
|
||||
void FBBackendSDL2::grabMouse(bool grab)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -508,7 +508,7 @@ void FBBackendSDL::grabMouse(bool grab)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool FBBackendSDL::fullScreen() const
|
||||
bool FBBackendSDL2::fullScreen() const
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -520,7 +520,7 @@ bool FBBackendSDL::fullScreen() const
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int FBBackendSDL::refreshRate() const
|
||||
int FBBackendSDL2::refreshRate() const
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -537,7 +537,7 @@ int FBBackendSDL::refreshRate() const
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBBackendSDL::renderToScreen()
|
||||
void FBBackendSDL2::renderToScreen()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -546,7 +546,7 @@ void FBBackendSDL::renderToScreen()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBBackendSDL::setWindowIcon()
|
||||
void FBBackendSDL2::setWindowIcon()
|
||||
{
|
||||
#if !defined(BSPF_MACOS) && !defined(RETRON77)
|
||||
#include "stella_icon.hxx"
|
||||
|
@ -560,20 +560,20 @@ void FBBackendSDL::setWindowIcon()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
unique_ptr<FBSurface> FBBackendSDL::createSurface(
|
||||
unique_ptr<FBSurface> FBBackendSDL2::createSurface(
|
||||
uInt32 w,
|
||||
uInt32 h,
|
||||
ScalingInterpolation inter,
|
||||
const uInt32* data
|
||||
) const
|
||||
{
|
||||
return make_unique<FBSurfaceSDL>
|
||||
(const_cast<FBBackendSDL&>(*this), w, h, inter, data);
|
||||
return make_unique<FBSurfaceSDL2>
|
||||
(const_cast<FBBackendSDL2&>(*this), w, h, inter, data);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBBackendSDL::readPixels(uInt8* buffer, size_t pitch,
|
||||
const Common::Rect& rect) const
|
||||
void FBBackendSDL2::readPixels(uInt8* buffer, size_t pitch,
|
||||
const Common::Rect& rect) const
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -585,7 +585,7 @@ void FBBackendSDL::readPixels(uInt8* buffer, size_t pitch,
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBBackendSDL::clear()
|
||||
void FBBackendSDL2::clear()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -593,7 +593,7 @@ void FBBackendSDL::clear()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBBackendSDL::detectFeatures()
|
||||
void FBBackendSDL2::detectFeatures()
|
||||
{
|
||||
myRenderTargetSupport = detectRenderTargetSupport();
|
||||
|
||||
|
@ -602,7 +602,7 @@ void FBBackendSDL::detectFeatures()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool FBBackendSDL::detectRenderTargetSupport()
|
||||
bool FBBackendSDL2::detectRenderTargetSupport()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -631,7 +631,7 @@ bool FBBackendSDL::detectRenderTargetSupport()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBBackendSDL::determineDimensions()
|
||||
void FBBackendSDL2::determineDimensions()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
|
@ -8,38 +8,38 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//============================================================================
|
||||
|
||||
#ifndef FB_BACKEND_SDL_HXX
|
||||
#define FB_BACKEND_SDL_HXX
|
||||
#ifndef FB_BACKEND_SDL2_HXX
|
||||
#define FB_BACKEND_SDL2_HXX
|
||||
|
||||
#include "SDL_lib.hxx"
|
||||
|
||||
class OSystem;
|
||||
class FBSurfaceSDL;
|
||||
class FBSurfaceSDL2;
|
||||
|
||||
#include "bspf.hxx"
|
||||
#include "FBBackend.hxx"
|
||||
|
||||
/**
|
||||
This class implements a standard SDL 2D, hardware accelerated framebuffer
|
||||
This class implements a standard SDL2 2D, hardware accelerated framebuffer
|
||||
backend. Behind the scenes, it may be using Direct3D, OpenGL(ES), etc.
|
||||
|
||||
@author Stephen Anthony
|
||||
*/
|
||||
class FBBackendSDL : public FBBackend
|
||||
class FBBackendSDL2 : public FBBackend
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Creates a new SDL framebuffer
|
||||
Creates a new SDL2 framebuffer
|
||||
*/
|
||||
explicit FBBackendSDL(OSystem& osystem);
|
||||
~FBBackendSDL() override;
|
||||
explicit FBBackendSDL2(OSystem& osystem);
|
||||
~FBBackendSDL2() override;
|
||||
|
||||
public:
|
||||
/**
|
||||
|
@ -305,11 +305,11 @@ class FBBackendSDL : public FBBackend
|
|||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
FBBackendSDL() = delete;
|
||||
FBBackendSDL(const FBBackendSDL&) = delete;
|
||||
FBBackendSDL(FBBackendSDL&&) = delete;
|
||||
FBBackendSDL& operator=(const FBBackendSDL&) = delete;
|
||||
FBBackendSDL& operator=(FBBackendSDL&&) = delete;
|
||||
FBBackendSDL2() = delete;
|
||||
FBBackendSDL2(const FBBackendSDL2&) = delete;
|
||||
FBBackendSDL2(FBBackendSDL2&&) = delete;
|
||||
FBBackendSDL2& operator=(const FBBackendSDL2&) = delete;
|
||||
FBBackendSDL2& operator=(FBBackendSDL2&&) = delete;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -8,14 +8,14 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//============================================================================
|
||||
|
||||
#include "FBSurfaceSDL.hxx"
|
||||
#include "FBSurfaceSDL2.hxx"
|
||||
|
||||
#include "Logger.hxx"
|
||||
#include "ThreadDebugging.hxx"
|
||||
|
@ -41,10 +41,10 @@ namespace {
|
|||
} // namespace
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
FBSurfaceSDL::FBSurfaceSDL(FBBackendSDL& backend,
|
||||
uInt32 width, uInt32 height,
|
||||
ScalingInterpolation inter,
|
||||
const uInt32* staticData)
|
||||
FBSurfaceSDL2::FBSurfaceSDL2(FBBackendSDL2& backend,
|
||||
uInt32 width, uInt32 height,
|
||||
ScalingInterpolation inter,
|
||||
const uInt32* staticData)
|
||||
: myBackend{backend},
|
||||
myInterpolationMode{inter}
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ FBSurfaceSDL::FBSurfaceSDL(FBBackendSDL& backend,
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
FBSurfaceSDL::~FBSurfaceSDL()
|
||||
FBSurfaceSDL2::~FBSurfaceSDL2()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -65,7 +65,7 @@ FBSurfaceSDL::~FBSurfaceSDL()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, ColorId color)
|
||||
void FBSurfaceSDL2::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, ColorId color)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -79,45 +79,45 @@ void FBSurfaceSDL::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, ColorId colo
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt32 FBSurfaceSDL::width() const
|
||||
uInt32 FBSurfaceSDL2::width() const
|
||||
{
|
||||
return mySurface->w;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt32 FBSurfaceSDL::height() const
|
||||
uInt32 FBSurfaceSDL2::height() const
|
||||
{
|
||||
return mySurface->h;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
const Common::Rect& FBSurfaceSDL::srcRect() const
|
||||
const Common::Rect& FBSurfaceSDL2::srcRect() const
|
||||
{
|
||||
return mySrcGUIR;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
const Common::Rect& FBSurfaceSDL::dstRect() const
|
||||
const Common::Rect& FBSurfaceSDL2::dstRect() const
|
||||
{
|
||||
return myDstGUIR;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::setSrcPos(uInt32 x, uInt32 y)
|
||||
void FBSurfaceSDL2::setSrcPos(uInt32 x, uInt32 y)
|
||||
{
|
||||
if(setSrcPosInternal(x, y))
|
||||
reinitializeBlitter();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::setSrcSize(uInt32 w, uInt32 h)
|
||||
void FBSurfaceSDL2::setSrcSize(uInt32 w, uInt32 h)
|
||||
{
|
||||
if(setSrcSizeInternal(w, h))
|
||||
reinitializeBlitter();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::setSrcRect(const Common::Rect& r)
|
||||
void FBSurfaceSDL2::setSrcRect(const Common::Rect& r)
|
||||
{
|
||||
const bool posChanged = setSrcPosInternal(r.x(), r.y()),
|
||||
sizeChanged = setSrcSizeInternal(r.w(), r.h());
|
||||
|
@ -127,21 +127,21 @@ void FBSurfaceSDL::setSrcRect(const Common::Rect& r)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::setDstPos(uInt32 x, uInt32 y)
|
||||
void FBSurfaceSDL2::setDstPos(uInt32 x, uInt32 y)
|
||||
{
|
||||
if(setDstPosInternal(x, y))
|
||||
reinitializeBlitter();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::setDstSize(uInt32 w, uInt32 h)
|
||||
void FBSurfaceSDL2::setDstSize(uInt32 w, uInt32 h)
|
||||
{
|
||||
if(setDstSizeInternal(w, h))
|
||||
reinitializeBlitter();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::setDstRect(const Common::Rect& r)
|
||||
void FBSurfaceSDL2::setDstRect(const Common::Rect& r)
|
||||
{
|
||||
const bool posChanged = setDstPosInternal(r.x(), r.y()),
|
||||
sizeChanged = setDstSizeInternal(r.w(), r.h());
|
||||
|
@ -151,23 +151,22 @@ void FBSurfaceSDL::setDstRect(const Common::Rect& r)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::setVisible(bool visible)
|
||||
void FBSurfaceSDL2::setVisible(bool visible)
|
||||
{
|
||||
myIsVisible = visible;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::translateCoords(Int32& x, Int32& y) const
|
||||
void FBSurfaceSDL2::translateCoords(Int32& x, Int32& y) const
|
||||
{
|
||||
x -= myDstR.x; x /= myDstR.w / mySrcR.w;
|
||||
y -= myDstR.y; y /= myDstR.h / mySrcR.h;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool FBSurfaceSDL::render()
|
||||
bool FBSurfaceSDL2::render()
|
||||
{
|
||||
if(!myBlitter)
|
||||
reinitializeBlitter();
|
||||
if (!myBlitter) reinitializeBlitter();
|
||||
|
||||
if(myIsVisible && myBlitter)
|
||||
{
|
||||
|
@ -179,7 +178,7 @@ bool FBSurfaceSDL::render()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::invalidate()
|
||||
void FBSurfaceSDL2::invalidate()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -187,7 +186,7 @@ void FBSurfaceSDL::invalidate()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::invalidateRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h)
|
||||
void FBSurfaceSDL2::invalidateRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -203,13 +202,13 @@ void FBSurfaceSDL::invalidateRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::reload()
|
||||
void FBSurfaceSDL2::reload()
|
||||
{
|
||||
reinitializeBlitter(true);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::resize(uInt32 width, uInt32 height)
|
||||
void FBSurfaceSDL2::resize(uInt32 width, uInt32 height)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -225,7 +224,8 @@ void FBSurfaceSDL::resize(uInt32 width, uInt32 height)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::createSurface(uInt32 width, uInt32 height, const uInt32* data)
|
||||
void FBSurfaceSDL2::createSurface(uInt32 width, uInt32 height,
|
||||
const uInt32* data)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -258,7 +258,7 @@ void FBSurfaceSDL::createSurface(uInt32 width, uInt32 height, const uInt32* data
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::reinitializeBlitter(bool force)
|
||||
void FBSurfaceSDL2::reinitializeBlitter(bool force)
|
||||
{
|
||||
if (force)
|
||||
myBlitter.reset();
|
||||
|
@ -273,13 +273,13 @@ void FBSurfaceSDL::reinitializeBlitter(bool force)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::applyAttributes()
|
||||
void FBSurfaceSDL2::applyAttributes()
|
||||
{
|
||||
reinitializeBlitter();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL::setScalingInterpolation(ScalingInterpolation interpolation)
|
||||
void FBSurfaceSDL2::setScalingInterpolation(ScalingInterpolation interpolation)
|
||||
{
|
||||
if (interpolation == ScalingInterpolation::sharp &&
|
||||
(
|
|
@ -8,33 +8,33 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//============================================================================
|
||||
|
||||
#ifndef FBSURFACE_SDL_HXX
|
||||
#define FBSURFACE_SDL_HXX
|
||||
#ifndef FBSURFACE_SDL2_HXX
|
||||
#define FBSURFACE_SDL2_HXX
|
||||
|
||||
#include "bspf.hxx"
|
||||
#include "FBSurface.hxx"
|
||||
#include "FBBackendSDL.hxx"
|
||||
#include "FBBackendSDL2.hxx"
|
||||
#include "sdl_blitter/Blitter.hxx"
|
||||
|
||||
/**
|
||||
An FBSurface suitable for the SDL Render2D API, making use of hardware
|
||||
An FBSurface suitable for the SDL2 Render2D API, making use of hardware
|
||||
acceleration behind the scenes.
|
||||
|
||||
@author Stephen Anthony
|
||||
*/
|
||||
class FBSurfaceSDL : public FBSurface
|
||||
class FBSurfaceSDL2 : public FBSurface
|
||||
{
|
||||
public:
|
||||
FBSurfaceSDL(FBBackendSDL& backend, uInt32 width, uInt32 height,
|
||||
ScalingInterpolation inter, const uInt32* staticData);
|
||||
~FBSurfaceSDL() override;
|
||||
FBSurfaceSDL2(FBBackendSDL2& backend, uInt32 width, uInt32 height,
|
||||
ScalingInterpolation inter, const uInt32* staticData);
|
||||
~FBSurfaceSDL2() override;
|
||||
|
||||
// Most of the surface drawing primitives are implemented in FBSurface;
|
||||
// the ones implemented here use SDL-specific code for extra performance
|
||||
|
@ -70,7 +70,7 @@ class FBSurfaceSDL : public FBSurface
|
|||
|
||||
private:
|
||||
bool setSrcPosInternal(uInt32 x, uInt32 y) {
|
||||
if(std::cmp_not_equal(x, mySrcR.x) || std::cmp_not_equal(y, mySrcR.y))
|
||||
if(x != static_cast<uInt32>(mySrcR.x) || y != static_cast<uInt32>(mySrcR.y))
|
||||
{
|
||||
mySrcR.x = x; mySrcR.y = y;
|
||||
mySrcGUIR.moveTo(x, y);
|
||||
|
@ -79,7 +79,7 @@ class FBSurfaceSDL : public FBSurface
|
|||
return false;
|
||||
}
|
||||
bool setSrcSizeInternal(uInt32 w, uInt32 h) {
|
||||
if(std::cmp_not_equal(w, mySrcR.w) || std::cmp_not_equal(h, mySrcR.h))
|
||||
if(w != static_cast<uInt32>(mySrcR.w) || h != static_cast<uInt32>(mySrcR.h))
|
||||
{
|
||||
mySrcR.w = w; mySrcR.h = h;
|
||||
mySrcGUIR.setWidth(w); mySrcGUIR.setHeight(h);
|
||||
|
@ -88,7 +88,7 @@ class FBSurfaceSDL : public FBSurface
|
|||
return false;
|
||||
}
|
||||
bool setDstPosInternal(uInt32 x, uInt32 y) {
|
||||
if(std::cmp_not_equal(x, myDstR.x) || std::cmp_not_equal(y, myDstR.y))
|
||||
if(x != static_cast<uInt32>(myDstR.x) || y != static_cast<uInt32>(myDstR.y))
|
||||
{
|
||||
myDstR.x = x; myDstR.y = y;
|
||||
myDstGUIR.moveTo(x, y);
|
||||
|
@ -97,7 +97,7 @@ class FBSurfaceSDL : public FBSurface
|
|||
return false;
|
||||
}
|
||||
bool setDstSizeInternal(uInt32 w, uInt32 h) {
|
||||
if(std::cmp_not_equal(w, myDstR.w) || std::cmp_not_equal(h, myDstR.h))
|
||||
if(w != static_cast<uInt32>(myDstR.w) || h != static_cast<uInt32>(myDstR.h))
|
||||
{
|
||||
myDstR.w = w; myDstR.h = h;
|
||||
myDstGUIR.setWidth(w); myDstGUIR.setHeight(h);
|
||||
|
@ -111,17 +111,18 @@ class FBSurfaceSDL : public FBSurface
|
|||
void reinitializeBlitter(bool force = false);
|
||||
|
||||
// Following constructors and assignment operators not supported
|
||||
FBSurfaceSDL() = delete;
|
||||
FBSurfaceSDL(const FBSurfaceSDL&) = delete;
|
||||
FBSurfaceSDL(FBSurfaceSDL&&) = delete;
|
||||
FBSurfaceSDL& operator=(const FBSurfaceSDL&) = delete;
|
||||
FBSurfaceSDL& operator=(FBSurfaceSDL&&) = delete;
|
||||
FBSurfaceSDL2() = delete;
|
||||
FBSurfaceSDL2(const FBSurfaceSDL2&) = delete;
|
||||
FBSurfaceSDL2(FBSurfaceSDL2&&) = delete;
|
||||
FBSurfaceSDL2& operator=(const FBSurfaceSDL2&) = delete;
|
||||
FBSurfaceSDL2& operator=(FBSurfaceSDL2&&) = delete;
|
||||
|
||||
private:
|
||||
FBBackendSDL& myBackend;
|
||||
FBBackendSDL2& myBackend;
|
||||
|
||||
unique_ptr<Blitter> myBlitter;
|
||||
ScalingInterpolation myInterpolationMode{ScalingInterpolation::none};
|
||||
ScalingInterpolation myInterpolationMode
|
||||
{ScalingInterpolation::none};
|
||||
|
||||
SDL_Surface* mySurface{nullptr};
|
||||
SDL_Rect mySrcR{-1, -1, -1, -1}, myDstR{-1, -1, -1, -1};
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -381,7 +381,8 @@ string HighScoresManager::formattedScore(Int32 score, Int32 width) const
|
|||
|
||||
if(scoreBCD(jprops))
|
||||
{
|
||||
digits = std::max(width, digits);
|
||||
if(width > digits)
|
||||
digits = width;
|
||||
buf << std::setw(digits) << std::setfill(' ') << score;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -132,7 +132,7 @@ class HighScoresManager
|
|||
|
||||
@return The number of score address bytes
|
||||
*/
|
||||
static constexpr uInt32 numAddrBytes(Int32 digits, Int32 trailing) {
|
||||
static uInt32 numAddrBytes(Int32 digits, Int32 trailing) {
|
||||
return (digits - trailing + 1) / 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -188,26 +188,27 @@ json JoyMap::saveMapping(EventMode mode) const
|
|||
using MapType = std::pair<JoyMapping, Event::Type>;
|
||||
std::vector<MapType> sortedMap(myMap.begin(), myMap.end());
|
||||
|
||||
std::ranges::sort(sortedMap, [](const MapType& a, const MapType& b)
|
||||
{
|
||||
// Event::Type first
|
||||
if(a.first.button != b.first.button)
|
||||
return a.first.button < b.first.button;
|
||||
std::sort(sortedMap.begin(), sortedMap.end(),
|
||||
[](const MapType& a, const MapType& b)
|
||||
{
|
||||
// Event::Type first
|
||||
if(a.first.button != b.first.button)
|
||||
return a.first.button < b.first.button;
|
||||
|
||||
if(a.first.axis != b.first.axis)
|
||||
return a.first.axis < b.first.axis;
|
||||
if(a.first.axis != b.first.axis)
|
||||
return a.first.axis < b.first.axis;
|
||||
|
||||
if(a.first.adir != b.first.adir)
|
||||
return a.first.adir < b.first.adir;
|
||||
if(a.first.adir != b.first.adir)
|
||||
return a.first.adir < b.first.adir;
|
||||
|
||||
if(a.first.hat != b.first.hat)
|
||||
return a.first.hat < b.first.hat;
|
||||
if(a.first.hat != b.first.hat)
|
||||
return a.first.hat < b.first.hat;
|
||||
|
||||
if(a.first.hdir != b.first.hdir)
|
||||
return a.first.hdir < b.first.hdir;
|
||||
if(a.first.hdir != b.first.hdir)
|
||||
return a.first.hdir < b.first.hdir;
|
||||
|
||||
return a.second < b.second;
|
||||
}
|
||||
return a.second < b.second;
|
||||
}
|
||||
);
|
||||
|
||||
json eventMappings = json::array();
|
||||
|
@ -284,17 +285,17 @@ int JoyMap::loadMapping(const json& eventMappings, EventMode mode)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
json JoyMap::convertLegacyMapping(string lst)
|
||||
json JoyMap::convertLegacyMapping(string list)
|
||||
{
|
||||
json eventMappings = json::array();
|
||||
|
||||
// Since istringstream swallows whitespace, we have to make the
|
||||
// delimiters be spaces
|
||||
std::ranges::replace(lst, '|', ' ');
|
||||
std::ranges::replace(lst, ':', ' ');
|
||||
std::ranges::replace(lst, ',', ' ');
|
||||
std::replace(list.begin(), list.end(), '|', ' ');
|
||||
std::replace(list.begin(), list.end(), ':', ' ');
|
||||
std::replace(list.begin(), list.end(), ',', ' ');
|
||||
|
||||
istringstream buf(lst);
|
||||
istringstream buf(list);
|
||||
int event = 0, button = 0, axis = 0, adir = 0, hat = 0, hdir = 0;
|
||||
|
||||
while(buf >> event && buf >> button
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -112,7 +112,7 @@ class JoyMap
|
|||
nlohmann::json saveMapping(EventMode mode) const;
|
||||
int loadMapping(const nlohmann::json& eventMappings, EventMode mode);
|
||||
|
||||
static nlohmann::json convertLegacyMapping(string lst);
|
||||
static nlohmann::json convertLegacyMapping(string list);
|
||||
|
||||
/** Erase all mappings for given mode */
|
||||
void eraseMode(EventMode mode);
|
||||
|
@ -129,10 +129,10 @@ class JoyMap
|
|||
size_t operator()(const JoyMapping& m)const {
|
||||
return std::hash<uInt64>()((static_cast<uInt64>(m.mode)) // 3 bits
|
||||
+ ((static_cast<uInt64>(m.button)) * 7) // 3 bits
|
||||
+ (((static_cast<uInt64>(m.axis)) << 0) // 3 bits
|
||||
| ((static_cast<uInt64>(m.adir)) << 3) // 2 bits
|
||||
| ((static_cast<uInt64>(m.hat )) << 5) // 1 bit
|
||||
| ((static_cast<uInt64>(m.hdir)) << 6) // 2 bits
|
||||
+ (((static_cast<uInt64>(m.axis)) << 0) // 2 bits
|
||||
| ((static_cast<uInt64>(m.adir)) << 2) // 2 bits
|
||||
| ((static_cast<uInt64>(m.hat )) << 4) // 1 bit
|
||||
| ((static_cast<uInt64>(m.hdir)) << 5) // 2 bits
|
||||
) * 61
|
||||
);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -222,7 +222,8 @@ json KeyMap::saveMapping(EventMode mode) const
|
|||
using MapType = std::pair<Mapping, Event::Type>;
|
||||
std::vector<MapType> sortedMap(myMap.begin(), myMap.end());
|
||||
|
||||
std::ranges::sort(sortedMap, [](const MapType& a, const MapType& b)
|
||||
std::sort(sortedMap.begin(), sortedMap.end(),
|
||||
[](const MapType& a, const MapType& b)
|
||||
{
|
||||
// Event::Type first
|
||||
if(a.first.key != b.first.key)
|
||||
|
@ -289,11 +290,11 @@ json KeyMap::convertLegacyMapping(string_view lm)
|
|||
|
||||
// Since istringstream swallows whitespace, we have to make the
|
||||
// delimiters be spaces
|
||||
string lst{lm};
|
||||
std::ranges::replace(lst, '|', ' ');
|
||||
std::ranges::replace(lst, ':', ' ');
|
||||
std::ranges::replace(lst, ',', ' ');
|
||||
istringstream buf(lst);
|
||||
string list{lm};
|
||||
std::replace(list.begin(), list.end(), '|', ' ');
|
||||
std::replace(list.begin(), list.end(), ':', ' ');
|
||||
std::replace(list.begin(), list.end(), ',', ' ');
|
||||
istringstream buf(list);
|
||||
int event = 0, key = 0, mod = 0;
|
||||
|
||||
while(buf >> event && buf >> key && buf >> mod)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -17,10 +17,6 @@
|
|||
|
||||
#include "Logger.hxx"
|
||||
|
||||
#ifdef __LIB_RETRO__
|
||||
extern void libretro_logger(int log_level, const char *string);
|
||||
#endif
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Logger& Logger::instance()
|
||||
{
|
||||
|
@ -56,10 +52,6 @@ void Logger::debug(string_view message)
|
|||
void Logger::logMessage(string_view message, Level level)
|
||||
{
|
||||
const std::lock_guard<std::mutex> lock(mutex);
|
||||
|
||||
#ifdef __LIB_RETRO__
|
||||
libretro_logger(static_cast<int>(level), string{message}.c_str());
|
||||
#endif
|
||||
|
||||
if(level == Logger::Level::ERR)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -53,8 +53,8 @@
|
|||
#include "EventHandlerLIBRETRO.hxx"
|
||||
#include "FBBackendLIBRETRO.hxx"
|
||||
#elif defined(SDL_SUPPORT)
|
||||
#include "EventHandlerSDL.hxx"
|
||||
#include "FBBackendSDL.hxx"
|
||||
#include "EventHandlerSDL2.hxx"
|
||||
#include "FBBackendSDL2.hxx"
|
||||
#else
|
||||
#error Unsupported backend!
|
||||
#endif
|
||||
|
@ -63,7 +63,7 @@
|
|||
#if defined(__LIB_RETRO__)
|
||||
#include "SoundLIBRETRO.hxx"
|
||||
#elif defined(SDL_SUPPORT)
|
||||
#include "SoundSDL.hxx"
|
||||
#include "SoundSDL2.hxx"
|
||||
#else
|
||||
#include "SoundNull.hxx"
|
||||
#endif
|
||||
|
@ -133,7 +133,7 @@ class MediaFactory
|
|||
#if defined(__LIB_RETRO__)
|
||||
return make_unique<FBBackendLIBRETRO>(osystem);
|
||||
#elif defined(SDL_SUPPORT)
|
||||
return make_unique<FBBackendSDL>(osystem);
|
||||
return make_unique<FBBackendSDL2>(osystem);
|
||||
#else
|
||||
#error Unsupported platform for FrameBuffer!
|
||||
#endif
|
||||
|
@ -145,7 +145,7 @@ class MediaFactory
|
|||
#if defined(__LIB_RETRO__)
|
||||
return make_unique<SoundLIBRETRO>(osystem, audioSettings);
|
||||
#elif defined(SOUND_SUPPORT) && defined(SDL_SUPPORT)
|
||||
return make_unique<SoundSDL>(osystem, audioSettings);
|
||||
return make_unique<SoundSDL2>(osystem, audioSettings);
|
||||
#else
|
||||
return make_unique<SoundNull>(osystem);
|
||||
#endif
|
||||
|
@ -159,7 +159,7 @@ class MediaFactory
|
|||
#if defined(__LIB_RETRO__)
|
||||
return make_unique<EventHandlerLIBRETRO>(osystem);
|
||||
#elif defined(SDL_SUPPORT)
|
||||
return make_unique<EventHandlerSDL>(osystem);
|
||||
return make_unique<EventHandlerSDL2>(osystem);
|
||||
#else
|
||||
#error Unsupported platform for EventHandler!
|
||||
#endif
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -1037,8 +1037,6 @@ PhysicalKeyboardHandler::DefaultPaddleMapping = {
|
|||
{Event::LeftPaddleAFire, KBDK_SPACE},
|
||||
{Event::LeftPaddleAFire, KBDK_LCTRL},
|
||||
{Event::LeftPaddleAFire, KBDK_KP_5},
|
||||
{Event::LeftPaddleAButton1, KBDK_UP, KBDM_SHIFT},
|
||||
{Event::LeftPaddleAButton2, KBDK_DOWN, KBDM_SHIFT},
|
||||
|
||||
{Event::LeftPaddleBDecrease, KBDK_DOWN},
|
||||
{Event::LeftPaddleBIncrease, KBDK_UP},
|
||||
|
@ -1048,8 +1046,6 @@ PhysicalKeyboardHandler::DefaultPaddleMapping = {
|
|||
{Event::RightPaddleADecrease, KBDK_J},
|
||||
{Event::RightPaddleAIncrease, KBDK_G},
|
||||
{Event::RightPaddleAFire, KBDK_F},
|
||||
{Event::RightPaddleAButton1, KBDK_Y, KBDM_SHIFT},
|
||||
{Event::RightPaddleAButton2, KBDK_H, KBDM_SHIFT},
|
||||
|
||||
{Event::RightPaddleBDecrease, KBDK_H},
|
||||
{Event::RightPaddleBIncrease, KBDK_Y},
|
||||
|
@ -1101,16 +1097,10 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultDrivi
|
|||
{Event::LeftDrivingFire, KBDK_SPACE},
|
||||
{Event::LeftDrivingFire, KBDK_LCTRL},
|
||||
{Event::LeftDrivingFire, KBDK_KP_5},
|
||||
{Event::LeftDrivingButton1, KBDK_UP},
|
||||
{Event::LeftDrivingButton2, KBDK_DOWN},
|
||||
{Event::LeftDrivingButton1, KBDK_KP_8},
|
||||
{Event::LeftDrivingButton2, KBDK_KP_2},
|
||||
|
||||
{Event::RightDrivingCCW, KBDK_G},
|
||||
{Event::RightDrivingCW, KBDK_J},
|
||||
{Event::RightDrivingFire, KBDK_F},
|
||||
{Event::RightDrivingButton1, KBDK_Y},
|
||||
{Event::RightDrivingButton2, KBDK_H},
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -449,15 +449,13 @@ void PaletteHandler::generateCustomPalette(ConsoleTiming timing) const
|
|||
{
|
||||
constexpr int NUM_CHROMA = 16;
|
||||
constexpr int NUM_LUMA = 8;
|
||||
constexpr float SATURATION = 0.25F; // default saturation
|
||||
|
||||
if(timing == ConsoleTiming::ntsc)
|
||||
{
|
||||
constexpr float SATURATION = 0.30F; // default NTSC saturation
|
||||
vector2d IQ[NUM_CHROMA];
|
||||
// YIQ is YUV shifted by 33°
|
||||
// -90° + 33° = -57° would create a greenish yellow
|
||||
// -90° + 53° = -37° creates gold (which is correct according to the documentation)
|
||||
constexpr float offset = (33 + 20) * BSPF::PI_f / 180;
|
||||
// YIQ is YUV shifted by 33 degrees
|
||||
constexpr float offset = 33 * BSPF::PI_f / 180;
|
||||
const float shift = myPhaseNTSC * BSPF::PI_f / 180;
|
||||
|
||||
// color 0 is grayscale
|
||||
|
@ -480,9 +478,9 @@ void PaletteHandler::generateCustomPalette(ConsoleTiming timing) const
|
|||
float G = Y + dotProduct(IQ[chroma], IQG);
|
||||
float B = Y + dotProduct(IQ[chroma], IQB);
|
||||
|
||||
R = std::max(R, 0.F);
|
||||
G = std::max(G, 0.F);
|
||||
B = std::max(B, 0.F);
|
||||
if(R < 0) R = 0;
|
||||
if(G < 0) G = 0;
|
||||
if(B < 0) B = 0;
|
||||
|
||||
R = powf(R, 0.9F);
|
||||
G = powf(G, 0.9F);
|
||||
|
@ -498,7 +496,6 @@ void PaletteHandler::generateCustomPalette(ConsoleTiming timing) const
|
|||
}
|
||||
else if(timing == ConsoleTiming::pal)
|
||||
{
|
||||
constexpr float SATURATION = 0.25F; // default PAL saturation
|
||||
constexpr float offset = BSPF::PI_f;
|
||||
const float shift = myPhasePAL * BSPF::PI_f / 180;
|
||||
constexpr float fixedShift = 22.5F * BSPF::PI_f / 180;
|
||||
|
@ -672,9 +669,9 @@ const PaletteArray PaletteHandler::ourPALPalette = {
|
|||
0x6c6c6c, 0, 0x909090, 0, 0xb4b4b4, 0, 0xd8d8d8, 0,
|
||||
#else
|
||||
0x0b0b0b, 0, 0x333333, 0, 0x595959, 0, 0x7b7b7b, 0, // 0
|
||||
0x999999, 0, 0xb6b6b6, 0, 0xcfcfcf, 0, 0xe6e6e6, 0,
|
||||
0x0b0b0b, 0, 0x333333, 0, 0x595959, 0, 0x7b7b7b, 0, // 1
|
||||
0x999999, 0, 0xb6b6b6, 0, 0xcfcfcf, 0, 0xe6e6e6, 0,
|
||||
0x8b8b8b, 0, 0xaaaaaa, 0, 0xc7c7c7, 0, 0xe3e3e3, 0,
|
||||
0x000000, 0, 0x272727, 0, 0x404040, 0, 0x696969, 0, // 1
|
||||
0x8b8b8b, 0, 0xaaaaaa, 0, 0xc7c7c7, 0, 0xe3e3e3, 0,
|
||||
0x3b2400, 0, 0x664700, 0, 0x8b7000, 0, 0xac9200, 0, // 2
|
||||
0xc5ae36, 0, 0xdec85e, 0, 0xf7e27f, 0, 0xfff19e, 0,
|
||||
0x004500, 0, 0x006f00, 0, 0x3b9200, 0, 0x65b009, 0, // 3
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -33,7 +33,7 @@ class PaletteHandler
|
|||
static constexpr string_view SETTING_CUSTOM = "custom";
|
||||
|
||||
// Phase shift default and limits
|
||||
static constexpr float DEF_NTSC_SHIFT = 26.7F; // makes color $fx fall between $1x and $2x
|
||||
static constexpr float DEF_NTSC_SHIFT = 26.2F;
|
||||
static constexpr float DEF_PAL_SHIFT = 31.3F; // ~= 360 / 11.5
|
||||
static constexpr float MAX_PHASE_SHIFT = 4.5F;
|
||||
static constexpr float DEF_RGB_SHIFT = 0.0F;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -112,26 +112,26 @@ json PhysicalJoystick::convertLegacyMapping(string_view mapping, string_view nam
|
|||
{
|
||||
istringstream buf(string{mapping}); // TODO: fixed in C++23
|
||||
json convertedMapping = json::object();
|
||||
string lmap;
|
||||
string map;
|
||||
|
||||
// Skip joystick name
|
||||
getline(buf, lmap, MODE_DELIM);
|
||||
getline(buf, map, MODE_DELIM);
|
||||
|
||||
while (getline(buf, lmap, MODE_DELIM))
|
||||
while (getline(buf, map, MODE_DELIM))
|
||||
{
|
||||
int mode{0};
|
||||
|
||||
// Get event mode
|
||||
std::ranges::replace(lmap, '|', ' ');
|
||||
istringstream modeBuf(lmap);
|
||||
std::replace(map.begin(), map.end(), '|', ' ');
|
||||
istringstream modeBuf(map);
|
||||
modeBuf >> mode;
|
||||
|
||||
// Remove leading "<mode>|" string
|
||||
lmap.erase(0, 2);
|
||||
map.erase(0, 2);
|
||||
|
||||
const json lmappingForMode = JoyMap::convertLegacyMapping(lmap);
|
||||
const json mappingForMode = JoyMap::convertLegacyMapping(map);
|
||||
|
||||
convertedMapping[jsonName(static_cast<EventMode>(mode))] = lmappingForMode;
|
||||
convertedMapping[jsonName(static_cast<EventMode>(mode))] = mappingForMode;
|
||||
}
|
||||
|
||||
convertedMapping["name"] = name;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -114,10 +114,10 @@ private:
|
|||
|
||||
public:
|
||||
constexpr Rect() = default;
|
||||
constexpr explicit Rect(const Size& s) : bottom{s.h}, right{s.w} { assert(valid()); }
|
||||
constexpr Rect(uInt32 w, uInt32 h) : bottom{h}, right{w} { assert(valid()); }
|
||||
constexpr explicit Rect(const Size& s) : bottom{ s.h }, right{ s.w } { assert(valid()); }
|
||||
constexpr Rect(uInt32 w, uInt32 h) : bottom{ h }, right{ w } { assert(valid()); }
|
||||
constexpr Rect(const Point& p, uInt32 w, uInt32 h)
|
||||
: top(p.y), left(p.x), bottom(p.y + h), right(p.x + w) { assert(valid()); }
|
||||
: top(p.y), left(p.x), bottom(p.y + h), right( p.x + w) { assert(valid()); }
|
||||
constexpr Rect(uInt32 x1, uInt32 y1, uInt32 x2, uInt32 y2) : top{y1}, left{x1}, bottom{y2}, right{x2} { assert(valid()); }
|
||||
|
||||
constexpr uInt32 x() const { return left; }
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -114,7 +114,7 @@ bool RewindManager::addState(string_view message, bool timeMachine)
|
|||
interval = interval * scanlines / 262;
|
||||
}
|
||||
|
||||
if(myOSystem.console().system().cycles() - lastState.cycles < interval)
|
||||
if(myOSystem.console().tia().cycles() - lastState.cycles < interval)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ bool RewindManager::addState(string_view message, bool timeMachine)
|
|||
if(myStateManager.saveState(s) && myOSystem.console().tia().saveDisplay(s))
|
||||
{
|
||||
state.message = message;
|
||||
state.cycles = myOSystem.console().system().cycles();
|
||||
state.cycles = myOSystem.console().tia().cycles();
|
||||
myLastTimeMachineAdd = timeMachine;
|
||||
return true;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ bool RewindManager::addState(string_view message, bool timeMachine)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt32 RewindManager::rewindStates(uInt32 numStates)
|
||||
{
|
||||
const uInt64 startCycles = myOSystem.console().system().cycles();
|
||||
const uInt64 startCycles = myOSystem.console().tia().cycles();
|
||||
uInt32 i{0};
|
||||
string message;
|
||||
|
||||
|
@ -185,7 +185,7 @@ uInt32 RewindManager::rewindStates(uInt32 numStates)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt32 RewindManager::unwindStates(uInt32 numStates)
|
||||
{
|
||||
const uInt64 startCycles = myOSystem.console().system().cycles();
|
||||
const uInt64 startCycles = myOSystem.console().tia().cycles();
|
||||
uInt32 i{0};
|
||||
string message;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -31,16 +31,16 @@
|
|||
#include "audio/LanczosResampler.hxx"
|
||||
#include "ThreadDebugging.hxx"
|
||||
|
||||
#include "SoundSDL.hxx"
|
||||
#include "SoundSDL2.hxx"
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SoundSDL::SoundSDL(OSystem& osystem, AudioSettings& audioSettings)
|
||||
SoundSDL2::SoundSDL2(OSystem& osystem, AudioSettings& audioSettings)
|
||||
: Sound{osystem},
|
||||
myAudioSettings{audioSettings}
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
Logger::debug("SoundSDL::SoundSDL started ...");
|
||||
Logger::debug("SoundSDL2::SoundSDL2 started ...");
|
||||
|
||||
if(SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
|
||||
{
|
||||
|
@ -58,11 +58,11 @@ SoundSDL::SoundSDL(OSystem& osystem, AudioSettings& audioSettings)
|
|||
if(!openDevice())
|
||||
return;
|
||||
|
||||
Logger::debug("SoundSDL::SoundSDL initialized");
|
||||
Logger::debug("SoundSDL2::SoundSDL2 initialized");
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SoundSDL::~SoundSDL()
|
||||
SoundSDL2::~SoundSDL2()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -74,7 +74,7 @@ SoundSDL::~SoundSDL()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::queryHardware(VariantList& devices)
|
||||
void SoundSDL2::queryHardware(VariantList& devices)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -98,7 +98,7 @@ void SoundSDL::queryHardware(VariantList& devices)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool SoundSDL::openDevice()
|
||||
bool SoundSDL2::openDevice()
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -136,15 +136,15 @@ bool SoundSDL::openDevice()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::setEnabled(bool enable)
|
||||
void SoundSDL2::setEnabled(bool enable)
|
||||
{
|
||||
mute(!enable);
|
||||
pause(!enable);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::open(shared_ptr<AudioQueue> audioQueue,
|
||||
shared_ptr<const EmulationTiming> emulationTiming)
|
||||
void SoundSDL2::open(shared_ptr<AudioQueue> audioQueue,
|
||||
shared_ptr<const EmulationTiming> emulationTiming)
|
||||
{
|
||||
const string pre_about = myAboutString;
|
||||
|
||||
|
@ -158,7 +158,7 @@ void SoundSDL::open(shared_ptr<AudioQueue> audioQueue,
|
|||
myEmulationTiming = emulationTiming;
|
||||
myWavHandler.setSpeed(262 * 60 * 2. / myEmulationTiming->audioSampleRate());
|
||||
|
||||
Logger::debug("SoundSDL::open started ...");
|
||||
Logger::debug("SoundSDL2::open started ...");
|
||||
|
||||
audioQueue->ignoreOverflows(!myAudioSettings.enabled());
|
||||
if(!myAudioSettings.enabled())
|
||||
|
@ -184,11 +184,11 @@ void SoundSDL::open(shared_ptr<AudioQueue> audioQueue,
|
|||
// And start the SDL sound subsystem ...
|
||||
pause(false);
|
||||
|
||||
Logger::debug("SoundSDL::open finished");
|
||||
Logger::debug("SoundSDL2::open finished");
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::mute(bool enable)
|
||||
void SoundSDL2::mute(bool enable)
|
||||
{
|
||||
if(enable)
|
||||
myVolumeFactor = 0;
|
||||
|
@ -197,7 +197,7 @@ void SoundSDL::mute(bool enable)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::toggleMute()
|
||||
void SoundSDL2::toggleMute()
|
||||
{
|
||||
const bool wasMuted = myVolumeFactor == 0;
|
||||
mute(!wasMuted);
|
||||
|
@ -211,7 +211,7 @@ void SoundSDL::toggleMute()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool SoundSDL::pause(bool enable)
|
||||
bool SoundSDL2::pause(bool enable)
|
||||
{
|
||||
ASSERT_MAIN_THREAD;
|
||||
|
||||
|
@ -225,7 +225,7 @@ bool SoundSDL::pause(bool enable)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::setVolume(uInt32 volume)
|
||||
void SoundSDL2::setVolume(uInt32 volume)
|
||||
{
|
||||
if(myIsInitializedFlag && (volume <= 100))
|
||||
{
|
||||
|
@ -235,7 +235,7 @@ void SoundSDL::setVolume(uInt32 volume)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::adjustVolume(int direction)
|
||||
void SoundSDL2::adjustVolume(int direction)
|
||||
{
|
||||
Int32 percent = myAudioSettings.volume();
|
||||
percent = BSPF::clamp(percent + direction * 2, 0, 100);
|
||||
|
@ -257,7 +257,7 @@ void SoundSDL::adjustVolume(int direction)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string SoundSDL::about() const
|
||||
string SoundSDL2::about() const
|
||||
{
|
||||
ostringstream buf;
|
||||
buf << "Sound enabled:\n"
|
||||
|
@ -315,7 +315,7 @@ string SoundSDL::about() const
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::initResampler()
|
||||
void SoundSDL2::initResampler()
|
||||
{
|
||||
const Resampler::NextFragmentCallback nextFragmentCallback = [this] () -> Int16* {
|
||||
Int16* nextFragment = nullptr;
|
||||
|
@ -365,9 +365,9 @@ void SoundSDL::initResampler()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::callback(void* object, uInt8* stream, int len)
|
||||
void SoundSDL2::callback(void* object, uInt8* stream, int len)
|
||||
{
|
||||
const auto* self = static_cast<SoundSDL*>(object);
|
||||
auto* self = static_cast<SoundSDL2*>(object);
|
||||
|
||||
if(self->myAudioQueue && self->myResampler)
|
||||
{
|
||||
|
@ -378,14 +378,14 @@ void SoundSDL::callback(void* object, uInt8* stream, int len)
|
|||
self->myResampler->fillFragment(s, length);
|
||||
|
||||
for(uInt32 i = 0; i < length; ++i)
|
||||
s[i] *= SoundSDL::myVolumeFactor;
|
||||
s[i] *= SoundSDL2::myVolumeFactor;
|
||||
}
|
||||
else
|
||||
SDL_memset(stream, 0, len);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool SoundSDL::playWav(const string& fileName, uInt32 position, uInt32 length)
|
||||
bool SoundSDL2::playWav(const string& fileName, uInt32 position, uInt32 length)
|
||||
{
|
||||
const char* const device = myDeviceId
|
||||
? myDevices.at(myDeviceId).first.c_str()
|
||||
|
@ -395,19 +395,19 @@ bool SoundSDL::playWav(const string& fileName, uInt32 position, uInt32 length)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::stopWav()
|
||||
void SoundSDL2::stopWav()
|
||||
{
|
||||
myWavHandler.stop();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt32 SoundSDL::wavSize() const
|
||||
uInt32 SoundSDL2::wavSize() const
|
||||
{
|
||||
return myWavHandler.size();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool SoundSDL::WavHandlerSDL::play(
|
||||
bool SoundSDL2::WavHandlerSDL2::play(
|
||||
const string& fileName, const char* device, uInt32 position, uInt32 length)
|
||||
{
|
||||
// Load WAV file
|
||||
|
@ -450,7 +450,7 @@ bool SoundSDL::WavHandlerSDL::play(
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::WavHandlerSDL::stop()
|
||||
void SoundSDL2::WavHandlerSDL2::stop()
|
||||
{
|
||||
if(myBuffer)
|
||||
{
|
||||
|
@ -467,7 +467,7 @@ void SoundSDL::WavHandlerSDL::stop()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::WavHandlerSDL::processWav(uInt8* stream, uInt32 len)
|
||||
void SoundSDL2::WavHandlerSDL2::processWav(uInt8* stream, uInt32 len)
|
||||
{
|
||||
SDL_memset(stream, mySpec.silence, len);
|
||||
if(myRemaining)
|
||||
|
@ -479,7 +479,7 @@ void SoundSDL::WavHandlerSDL::processWav(uInt8* stream, uInt32 len)
|
|||
const int newFreq =
|
||||
std::round(static_cast<double>(mySpec.freq) * origLen / len);
|
||||
|
||||
if(len > myRemaining) // NOLINT(readability-use-std-min-max)
|
||||
if(len > myRemaining)
|
||||
len = myRemaining;
|
||||
|
||||
SDL_AudioCVT cvt;
|
||||
|
@ -488,7 +488,8 @@ void SoundSDL::WavHandlerSDL::processWav(uInt8* stream, uInt32 len)
|
|||
SDL_assert(cvt.needed); // Obviously, this one is always needed.
|
||||
cvt.len = len * mySpec.channels; // Mono 8 bit sample frames
|
||||
|
||||
if(!myCvtBuffer || std::cmp_less(myCvtBufferSize, cvt.len * cvt.len_mult))
|
||||
if(!myCvtBuffer ||
|
||||
myCvtBufferSize < static_cast<uInt32>(cvt.len * cvt.len_mult))
|
||||
{
|
||||
myCvtBufferSize = cvt.len * cvt.len_mult;
|
||||
myCvtBuffer = make_unique<uInt8[]>(myCvtBufferSize);
|
||||
|
@ -500,11 +501,11 @@ void SoundSDL::WavHandlerSDL::processWav(uInt8* stream, uInt32 len)
|
|||
SDL_ConvertAudio(&cvt);
|
||||
// Mix volume adjusted WAV data into silent buffer
|
||||
SDL_MixAudioFormat(stream, cvt.buf, mySpec.format, cvt.len_cvt,
|
||||
SDL_MIX_MAXVOLUME * SoundSDL::myVolumeFactor);
|
||||
SDL_MIX_MAXVOLUME * SoundSDL2::myVolumeFactor);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(len > myRemaining) // NOLINT(readability-use-std-min-max)
|
||||
if(len > myRemaining)
|
||||
len = myRemaining;
|
||||
|
||||
// Mix volume adjusted WAV data into silent buffer
|
||||
|
@ -517,14 +518,14 @@ void SoundSDL::WavHandlerSDL::processWav(uInt8* stream, uInt32 len)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::WavHandlerSDL::callback(void* object, uInt8* stream, int len)
|
||||
void SoundSDL2::WavHandlerSDL2::callback(void* object, uInt8* stream, int len)
|
||||
{
|
||||
static_cast<WavHandlerSDL*>(object)->processWav(
|
||||
static_cast<WavHandlerSDL2*>(object)->processWav(
|
||||
stream, static_cast<uInt32>(len));
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SoundSDL::WavHandlerSDL::~WavHandlerSDL()
|
||||
SoundSDL2::WavHandlerSDL2::~WavHandlerSDL2()
|
||||
{
|
||||
if(myDevice)
|
||||
{
|
||||
|
@ -534,13 +535,13 @@ SoundSDL::WavHandlerSDL::~WavHandlerSDL()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundSDL::WavHandlerSDL::pause(bool state) const
|
||||
void SoundSDL2::WavHandlerSDL2::pause(bool state) const
|
||||
{
|
||||
if(myDevice)
|
||||
SDL_PauseAudioDevice(myDevice, state ? 1 : 0);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
float SoundSDL::myVolumeFactor = 0.F;
|
||||
float SoundSDL2::myVolumeFactor = 0.F;
|
||||
|
||||
#endif // SOUND_SUPPORT
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -17,8 +17,8 @@
|
|||
|
||||
#ifdef SOUND_SUPPORT
|
||||
|
||||
#ifndef SOUND_SDL_HXX
|
||||
#define SOUND_SDL_HXX
|
||||
#ifndef SOUND_SDL2_HXX
|
||||
#define SOUND_SDL2_HXX
|
||||
|
||||
class OSystem;
|
||||
class AudioQueue;
|
||||
|
@ -36,15 +36,15 @@ class Resampler;
|
|||
|
||||
@author Stephen Anthony and Christian Speckner (DirtyHairy)
|
||||
*/
|
||||
class SoundSDL : public Sound
|
||||
class SoundSDL2 : public Sound
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Create a new sound object. The init method must be invoked before
|
||||
using the object.
|
||||
*/
|
||||
SoundSDL(OSystem& osystem, AudioSettings& audioSettings);
|
||||
~SoundSDL() override;
|
||||
SoundSDL2(OSystem& osystem, AudioSettings& audioSettings);
|
||||
~SoundSDL2() override;
|
||||
|
||||
public:
|
||||
/**
|
||||
|
@ -172,13 +172,13 @@ class SoundSDL : public Sound
|
|||
string myAboutString;
|
||||
|
||||
/**
|
||||
This class implements WAV file playback using the SDL sound API.
|
||||
This class implements WAV file playback using the SDL2 sound API.
|
||||
*/
|
||||
class WavHandlerSDL
|
||||
class WavHandlerSDL2
|
||||
{
|
||||
public:
|
||||
explicit WavHandlerSDL() = default;
|
||||
~WavHandlerSDL();
|
||||
explicit WavHandlerSDL2() = default;
|
||||
~WavHandlerSDL2();
|
||||
|
||||
bool play(const string& fileName, const char* device,
|
||||
uInt32 position, uInt32 length);
|
||||
|
@ -206,13 +206,13 @@ class SoundSDL : public Sound
|
|||
static void callback(void* object, uInt8* stream, int len);
|
||||
|
||||
// Following constructors and assignment operators not supported
|
||||
WavHandlerSDL(const WavHandlerSDL&) = delete;
|
||||
WavHandlerSDL(WavHandlerSDL&&) = delete;
|
||||
WavHandlerSDL& operator=(const WavHandlerSDL&) = delete;
|
||||
WavHandlerSDL& operator=(WavHandlerSDL&&) = delete;
|
||||
WavHandlerSDL2(const WavHandlerSDL2&) = delete;
|
||||
WavHandlerSDL2(WavHandlerSDL2&&) = delete;
|
||||
WavHandlerSDL2& operator=(const WavHandlerSDL2&) = delete;
|
||||
WavHandlerSDL2& operator=(WavHandlerSDL2&&) = delete;
|
||||
};
|
||||
|
||||
WavHandlerSDL myWavHandler;
|
||||
WavHandlerSDL2 myWavHandler;
|
||||
|
||||
static float myVolumeFactor; // Current volume level (0 - 100)
|
||||
|
||||
|
@ -221,11 +221,11 @@ class SoundSDL : public Sound
|
|||
static void callback(void* object, uInt8* stream, int len);
|
||||
|
||||
// Following constructors and assignment operators not supported
|
||||
SoundSDL() = delete;
|
||||
SoundSDL(const SoundSDL&) = delete;
|
||||
SoundSDL(SoundSDL&&) = delete;
|
||||
SoundSDL& operator=(const SoundSDL&) = delete;
|
||||
SoundSDL& operator=(SoundSDL&&) = delete;
|
||||
SoundSDL2() = delete;
|
||||
SoundSDL2(const SoundSDL2&) = delete;
|
||||
SoundSDL2(SoundSDL2&&) = delete;
|
||||
SoundSDL2& operator=(const SoundSDL2&) = delete;
|
||||
SoundSDL2& operator=(SoundSDL2&&) = delete;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -116,9 +116,7 @@ void StaggeredLogger::startInterval()
|
|||
Int64 msecSinceLastIntervalEnd =
|
||||
duration_cast<duration<Int64, std::milli>>(now - myLastIntervalEndTimestamp).count();
|
||||
|
||||
while (std::cmp_greater(msecSinceLastIntervalEnd, myCooldownTime) &&
|
||||
myCurrentIntervalFactor > 1)
|
||||
{
|
||||
while (msecSinceLastIntervalEnd > myCooldownTime && myCurrentIntervalFactor > 1) {
|
||||
msecSinceLastIntervalEnd -= myCooldownTime;
|
||||
decreaseInterval();
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -442,7 +442,7 @@ namespace StellaKeyName
|
|||
inline string_view forKey(StellaKey key)
|
||||
{
|
||||
#ifdef SDL_SUPPORT
|
||||
return SDL_GetScancodeName(static_cast<SDL_Scancode>(key));
|
||||
return SDL_GetScancodeName(SDL_Scancode(key));
|
||||
#else
|
||||
return string_view{};
|
||||
#endif
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -18,7 +18,7 @@
|
|||
#ifndef VERSION_HXX
|
||||
#define VERSION_HXX
|
||||
|
||||
#define STELLA_VERSION "7.1_pre"
|
||||
#define STELLA_VERSION "7.0"
|
||||
#define STELLA_BUILD "8005"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
@ -266,7 +266,8 @@ void ZipHandler::ZipFile::readEcd()
|
|||
uInt64 read_length = 0;
|
||||
|
||||
// Max out the buf length at the size of the file
|
||||
buflen = std::min(buflen, myLength);
|
||||
if(buflen > myLength)
|
||||
buflen = myLength;
|
||||
|
||||
// Allocate buffer
|
||||
const ByteBuffer buffer = make_unique<uInt8[]>(buflen + 1);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2025 by Bradford W. Mott, Stephen Anthony
|
||||
// Copyright (c) 1995-2024 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue