Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package schismtracker for openSUSE:Factory checked in at 2022-10-21 16:19:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/schismtracker (Old) and /work/SRC/openSUSE:Factory/.schismtracker.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "schismtracker" Fri Oct 21 16:19:34 2022 rev:23 rq:1030231 version:20221020 Changes: -------- --- /work/SRC/openSUSE:Factory/schismtracker/schismtracker.changes 2022-09-06 13:01:19.311010724 +0200 +++ /work/SRC/openSUSE:Factory/.schismtracker.new.2275/schismtracker.changes 2022-10-21 16:19:36.498179734 +0200 @@ -1,0 +2,11 @@ +Thu Oct 20 17:15:08 UTC 2022 - Jan Engelhardt <[email protected]> + +- Update to release 20221020 + * Fix duplicated key input in pattern editor, order list, and + instrument editor note table + * Respect audio-related SDL environment variables if set + * Fix handling of window width and height config file options + * Hint SDL not to disable window manager compositing + * Add 4:3 aspect ratio config file option (want_fixed) + +------------------------------------------------------------------- Old: ---- 20220905.tar.gz New: ---- 20221020.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ schismtracker.spec ++++++ --- /var/tmp/diff_new_pack.AfersO/_old 2022-10-21 16:19:37.062180792 +0200 +++ /var/tmp/diff_new_pack.AfersO/_new 2022-10-21 16:19:37.070180806 +0200 @@ -17,7 +17,7 @@ Name: schismtracker -Version: 20220905 +Version: 20221020 Release: 0 Summary: Music editor that matches the look and feel of Impulse Tracker License: GPL-2.0-or-later ++++++ 20220905.tar.gz -> 20221020.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/docs/building_on_linux.md new/schismtracker-20221020/docs/building_on_linux.md --- old/schismtracker-20220905/docs/building_on_linux.md 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/docs/building_on_linux.md 2022-10-20 17:51:29.000000000 +0200 @@ -1,55 +1,56 @@ # Building on Linux -**TODO: Update these instructions for SDL2.** - Since Linux is the primary development platform for Schism Tracker, it's probably the easiest to compile on, and those familiar with automake-based -projects will find few surprises here. +projects will find few surprises here. If you just want to use Schism Tracker +on 64-bit Linux, you can also download a pre-built binary from the release page +(just make sure you've installed SDL2). ## Prerequisites -You'll need [autoconf](http://www.gnu.org/software/autoconf/), -[automake](http://www.gnu.org/software/automake/), [gcc](http://gcc.gnu.org/), -[make](http://www.gnu.org/software/make/), [Python](https://www.python.org/) -and [LibSDL](http://www.libsdl.org/) *at a minimum*. Additionally, -[Git](https://git-scm.com/) is strongly recommended. If all you're planning on -doing is building it once, you can just as easily grab the source tarball from -the repository and build from that, but having Git installed makes it easier to -keep up-to-date, help with debugging, and (if you're so inclined) development. +On Ubuntu, run: + + sudo apt update + sudo apt install build-essential automake autoconf-archive libsdl2-dev \ + git libtool + +On Arch Linux: + + sudo pacman -Syu + sudo pacman -S base-devel git sdl2 alsa-lib libxv libxxf86vm -See below for distro-specific instructions on how to get everything installed -in order to build Schism Tracker. +Git is not strictly required, but if you don't need it you'll need to download +a tarball manually, and your build won't have a proper version string. -To get the source: +On other distros, the package names may be different. In particular, note that +`build-essential` includes the packages `gcc` and `make` on Debian-based +systems. + +If your distro doesn't come with Python by default, you'll also need that. + +## Setting up the source directory + +To get and set up the source directory for building: git clone https://github.com/schismtracker/schismtracker.git - cd schismtracker && autoreconf -i + cd schismtracker + autoreconf -i + mkdir -p build -You can then update your schismtracker source directory by going to this -schismtracker directory and running: +You can then update your Schism Tracker source directory by going to the +`schismtracker` directory and running: git pull ## Building Schism Tracker -To build Schism Tracker, you should set up a build-directory and compile from -there. From the schismtracker directory: +From the `schismtracker` directory: - mkdir -p build && cd build && ../configure && make + cd build && ../configure && make The resulting binary `schismtracker` is completely self-contained and can be copied anywhere you like on the filesystem. -You can specify custom compiler flags, e.g. to optimize schismtracker -stronly, system-dependently: - - make clean # recompiling needed after changing compiler setting - ../configure --enable-extra-opt - make -j $(nproc || sysctl -n hw.ncpu || echo 2) - -The -j flag passed to make enables compilation on multiple threads. -For debugging, and other settings, see `../configure --help`. - ## Packaging Schism Tracker for Linux systems The `icons/` directory contains icons that you may find suitable for your @@ -64,15 +65,11 @@ built with ALSA MIDI support, even if your SDL libraries include ALSA digital output. -See below for information on what packages you should install for your -distribution in order to build a full-featured Schism Tracker binary. +## Cross-compiling for Win32 -## Cross-compiling Win32 - -Schism Tracker can be built using the mingw32 cross-compiler on a Linux host. -You will also need the [SDL MINGW32 development -library](http://libsdl.org/download-1.2.php). If you unpacked it into -`/usr/i586-mingw32/`, you could use the following to cross-compile Schism +Schism Tracker can be built using the MinGW cross-compiler on a Linux host. +You will also need the [SDL2 MinGW development library][1]. If you unpacked it +into `/usr/i586-mingw32/`, you could use the following to cross-compile Schism Tracker for Win32: mkdir win32-build @@ -81,47 +78,35 @@ ../configure --{host,target}=i586-mingw32 --without-x make -If you want to build an installer using the [nullsoft scriptable install -system](http://nsis.sourceforge.net/), copy some files into your build -directory: +If you want to build an installer using the [Nullsoft Scriptable Install +System][2], copy some files into your build directory: cd build - cp /usr/i586-mingw32/bin/SDL.dll . + cp /usr/i586-mingw32/bin/SDL2.dll . cp ../COPYING COPYING.txt cp ../README README.txt cp ../NEWS NEWS.txt cp ../sys/win32/schism.nsis . cp ../icons/schismres.ico schism.ico -and run the makensis application: +and run the `makensis` application: makensis schism.nsis -## Distribution-specific instructions - -Getting the prerequisites covered is fairly straightforward in most Linux -distributions. - -#### Ubuntu / Debian - - apt-get install build-essential automake autoconf autoconf-archive \ - libx11-dev libxext-dev libxv-dev libxxf86misc-dev \ - libxxf86vm-dev libsdl1.2-dev libasound2-dev git \ - libtool - -Additionally, for cross-compiling win32 binaries: - - apt-get install mingw32 mingw32-binutils mingw32-runtime nsis +On Ubuntu, for cross-compiling Win32 binaries, run: -#### Arch Linux + sudo apt install mingw32 mingw32-binutils mingw32-runtime nsis - pacman -S base-devel git sdl alsa-lib libxv libxxf86vm +On Arch Linux: -For cross-compiling win32 binaries: + sudo pacman -S mingw-w64-gcc + yaourt -S mingw-w64-sdl2 nsis - pacman -S mingw-w64-gcc - yaourt -S mingw-w64-sdl nsis +Note: Yaourt isn't strictly necessary, but since `mingw-w64-sdl2` and `nsis` +are AUR packages, you'll have to build them by hand otherwise or use a +different [AUR helper][3]. `mingw-w64-sdl2` may or may not be necessary if +you've manually downloaded the MinGW SDL2 library as mentioned above. -Note: yaourt isn't strictly necessary, but since `mingw-w64-sdl` and `nsis` are -AUR packages, you'll have to build them by hand otherwise or use a different -[AUR helper](https://wiki.archlinux.org/index.php/AUR_helpers). +[1]: https://github.com/libsdl-org/SDL/releases +[2]: http://nsis.sourceforge.net/ +[3]: https://wiki.archlinux.org/index.php/AUR_helpers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/docs/building_on_osx.md new/schismtracker-20221020/docs/building_on_osx.md --- old/schismtracker-20220905/docs/building_on_osx.md 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/docs/building_on_osx.md 2022-10-20 17:51:29.000000000 +0200 @@ -1,127 +1,68 @@ # Building on OS X -**TODO: Update these instructions for SDL2.** +Start by installing [Homebrew](http://brew.sh/). Open up the Terminal and paste +in the following command: -Start by installing [Homebrew](http://brew.sh/). Open up the Terminal and paste in the following command. + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" -``` -/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" -``` +After Homebrew has been successfully installed, you need to install `automake`, +`autoconf`, `sdl2` and `git`. -After Homebrew has been successfully installed, you need to install `automake`, `autoconf`, `SDL` and `git`. + brew install automake autoconf sdl2 git -``` -brew install automake autoconf sdl git -``` +Alternatively, if you have MacPorts installed, you can use this command +instead: -Alternatively, if you have MacPorts installed, you can use this command instead: -``` -sudo port install automake autoconf libtool libsdl git -``` -In this case, you may have to open a new terminal shell, or else you may get warnings about the version of autoconf/automake you're using. + sudo port install automake autoconf libtool libsdl2 git + +In this case, you may have to open a new terminal shell, or else you may get +warnings about the version of autoconf/automake you're using. Now clone the GitHub repo: -``` -git clone https://github.com/schismtracker/schismtracker.git -``` + git clone https://github.com/schismtracker/schismtracker.git -Enter the Schismtracker folder and run `autoreconf -i` +Enter the Schismtracker folder and run `autoreconf -i`: -``` -cd schismtracker -autoreconf -i -``` + cd schismtracker + autoreconf -i -Now you will need to create the `build` -folder, enter it and start `../configure` +Now you will need to create the `build` folder, enter it and start the build: -``` -mkdir -p build -cd build -../configure && make -``` + mkdir -p build + cd build + ../configure && make -Test Schismtracker from the commandline by typing +Test Schismtracker from the commandline by typing: -``` -./schismtracker -``` + ./schismtracker -If it worked, you are ready to start the updating of the **Schism Tracker.app** +If it worked, you are ready to start the updating of the **Schism +Tracker.app**. ## Baking Schism Tracker into an App ready to be put in /Applications -If you are in the `build` -folder, discover the `Schism_Tracker.app` subfolder `Contents` and, after creating the `MacOS` -folder, copy the newly built `schismtracker` there - then test the `Schism_Tracker.app` by clicking on it in Finder. Here are the instructions on how to do it (this will open a Finder window showing the `sys/macosx` -folder, where-in you will see the app itself. - -``` -cd ../sys/macosx/Schism_Tracker.app/Contents/ -mkdir MacOS -cd MacOS -cp ../../../../../build/schismtracker . -cd ../../../ -open . -``` +If you are in the `build` folder, find the `Schism_Tracker.app` subfolder +`Contents` and, after creating the `MacOS` folder, copy the newly built +`schismtracker` there. Then test the `Schism_Tracker.app` by clicking on it in +Finder. Here are the instructions on how to do it (this will open a Finder +window showing the `sys/macosx` folder, wherein you will see the app itself. + + cd ../sys/macosx/Schism_Tracker.app/Contents/ + mkdir MacOS + cd MacOS + cp ../../../../../build/schismtracker . + cd ../../../ + open . -If this newly baked version of `Schism_Tracker.app` worked, just copy it to your `/Applications` -folder. +If this newly baked version of `Schism_Tracker.app` worked, just copy it to +your `/Applications` -folder. Enjoy. ## Building for distribution -However, if you want to build an application bundle *for distribution*, there's -a few potential snags. In particular, SDK versions are backward-incompatible, -so you need to make note of what version you're building with; and if you also -want to support the dwindling population of PowerPC users, you'll have to build -a Universal binary. Plus, since SDL is not normally present on OS X, you'll -need to bundle it in with the application. - -There used to be somewhat lengthy instructions here elaborating on various -nuances of installing Fink and managing multiple SDKs, but these have become -rather outdated and probably less than thoroughly useful. If anyone has current -and first-hand experience with building on OS X which might be helpful to -others, please feel free to share. - - -## Cross-compiling on a Linux host - -[This page](http://devs.openttd.org/~truebrain/compile-farm/apple-darwin9.txt) -has some notes that might be of use in building a cross-compilation toolchain. -Building a cross-compiler is *not* an easy process, and will probably take the -better part of a day; however, it is definitely possible, and in fact is what I -use for compiling the "official" OS X packages. The build process is rather -messy, but it goes something like: - - mkdir -p osx/{x86,ppc} - cd osx/x86 - env PATH=/usr/i686-apple-darwin9/bin:${PATH} \ - {C,CXX,OBJC}FLAGS='-g0 -O2' LDFLAGS=-s \ - ../../configure --with-sdl-prefix=/usr/i686-apple-darwin9 \ - --{target,host}=i686-apple-darwin9 \ - --build-i686-linux - env PATH=/usr/i686-apple-darwin9/bin:${PATH} make - cd ../ppc - env PATH=/usr/powerpc-apple-darwin9/bin:${PATH} \ - {C,CXX,OBJC}FLAGS='-g0 -O2' LDFLAGS=-s \ - ../../configure --with-sdl-prefix=/usr/powerpc-apple-darwin9 \ - --{target,host}=powerpc-apple-darwin9 \ - --build-i686-linux - env PATH=/usr/powerpc-apple-darwin9/bin:${PATH} make - cd .. - /usr/i686-apple-darwin9/bin/lipo -create -o {.,x86,ppc}/schismtracker - /usr/i686-apple-darwin9/bin/install_name_tool -change \ - '@executable_path/../Frameworks/SDL.framework/Versions/A/SDL' \ - '@executable_path/sdl.dylib' schismtracker - -Then copy the `lipo`'ed `schismtracker` and `sdl.dylib` both into the `MacOS/` -folder in the bundle, and it Should Work. The versions I have installed are GCC -4.0.1 (SVN v5493), ODCCTools SVN v280, and XCode SDK 3.1.3. This SDK version -advertises compatibility with 10.4 at minimum, although people have reported -success in running Schism Tracker on 10.3.9. - -Note: because parts of the debugging information are conspicuously absent, -cross-compiling with debugging symbols simply isn't possible. This isn't very -likely to be useful anyway; if you can run the program in a debugger, then -you're *probably* running OS X, in which case you might as well just build -natively and eliminate the hassle. +See the `build-macos` section of `.github/workflows/build.yml` for how Schism +currently does it. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/docs/building_on_windows.md new/schismtracker-20221020/docs/building_on_windows.md --- old/schismtracker-20220905/docs/building_on_windows.md 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/docs/building_on_windows.md 2022-10-20 17:51:29.000000000 +0200 @@ -1,35 +1,23 @@ # Building on Windows -**TODO: Update these instructions for SDL2.** +The easiest way to use Schism Tracker on Windows is to download one of the +pre-built binaries. However, if you want to build it yourself, it isn't too +tricky. -_This page was based originally on the COMPILE-WIN32.txt file traditionally -provided with Schism Tracker sources. It has been rewriten with instructions -that use newer tools._ +These instructions assume you are using 64-bit Windows to build a 64-bit +Schism executable. -## Software needed +## Installing the tools -To compile on Windows, the following things are needed: +We will be using an environment called MSYS2, which provides all the packages we +need in one place. -* mingw-gcc -* Python -* SDL headers and libs -* An environment in which to run them, like msys. - -If you want proper version information, you'll need git installed and in your -path too - -## Installing MSYS2 and mingw - -These instructions describe how to install msys2, which includes all of the -required packages. +If you want correct version information to show, you must also +have [git](https://git-scm.com/) installed and in your PATH. ### Get MSYS2 and install it -Go to the URL http://msys2.github.io/ and download either the 32bit installer -or the 64bit installer. The 32bit download can run on 32bit windows and the -64bit one requires a 64bit Windows. - -64bit executables can be created with either of them. +Go to the URL http://msys2.github.io/ and download the 64-bit installer. Once installed, follow these instructions to get up-to-date files. This process is also described in their web page, so in case of conflict, you might opt to @@ -38,15 +26,18 @@ Run the MSYS2 shell (a start menu shortcut should have been created) and update the pacman package manager: - pacman -Sy pacman + pacman -Sy pacman +Follow the onscreen options and choose "yes" where prompted. Close the MSYS2 window. Run it again from the Start menu and update the system: pacman -Syu -Close the MSYS2 window. Run it again from the Start menu _(note: the update +Again follow the instructions, chose "yes" where prompted, and close the MSYS2 window. + +Run it again from the Start menu _(note: the update process can, in some cases, break the start menu shortcut - in which case you -may need to look in C:\msys64 (or wherever you installed msys) and run +may need to look in C:\msys64 (or wherever you installed MSYS2) and run msys2\_shell.cmd)_ and update the rest with: pacman -Su @@ -56,43 +47,38 @@ Once you have the shell environment ready, it's time to get the compilers. Execute the following command: - pacman -S mingw-w64-i686-toolchain libtool autoconf automake make - -Also, you need the following specific dependency: + pacman -S mingw-w64-x86_64-toolchain libtool autoconf automake make - pacman -S mingw-w64-i686-SDL +If asked to "enter a selection", hit Enter to go with the default. -If you also want to build for 64bits: +Also, you need the following specific dependency: - pacman -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-SDL + pacman -S mingw-w64-x86_64-SDL2 -You can search for packages with - - pacman -Ss package descripption - +Once you have installed these packages, close all your MSYS2 windows +before continuing with the instructions. ## Compilation -MSYS2 installs three shortcut icons, one to run the msys shell, and two more -that setup the environment to use either the 32bit compiler or the 64bit -compiler. +MSYS2 installs three shortcut icons, one to run the MSYS2 shell, and two more +that setup the environment to use either the 32bit compiler or the 64-bit +compiler. We will be using the one called "MSYS2 MINGW64" throughout. -You can also start the 32bit compiler with - - msys2_shell.cmd -mingw32 - -and the 64bit compiler with +If you've lost the shortcuts, you can also start the 64bit compiler with msys2_shell.cmd -mingw64 ### Configure schismtracker to build -Open the 32bit or 64bit shell depending on which version you want to build. -The steps here only need to be done once, or when configure.ac or the installed -package versions change. +Open the 64-bit shell. -Go to schismtracker sources root (drive letters are mapped to /x , example C:/ -is /c/, D:/ is /d/ ...) +Download the Schismtracker sources (or clone the repo) and navigate to the +schismtracker-master folder (the one that contains README.md) using `cd` + +Drive letters are mapped to /x , example C:/ +is /c/, D:/ is /d/ ..., and so on. For example: + + cd /c/Users/YourUserName/Downloads/schismtracker-master/ Reconfigure it: @@ -100,78 +86,52 @@ _(note: if you get a "possibly undefined macro: AM\_PATH\_SDL" error, you're probably using the standard msys2 shell - either use the mingw start menu -shortcuts, or start msys2_shell.cmd with either -mingw32 or -mingw64 as -mentioned above)_ - -If you're planning to build both 32- and 64-bit binaries, you may wish to -create the subdirs build32 and build64: +shortcuts, or start `msys2_shell.cmd` with `-mingw64` as mentioned above)_ - mkdir build32 - mkdir build64 - -and then follow the rest of the instructions twice, once with the -mingw32 -shell in the build32 subdir, and once with the -mingw64 shell in the build64 -subdir. - -Otherwise just build will do: +Make a folder to build the binary in: mkdir build Now move into the build subdir and run the configure script: - cd build # or build32 or build64 as appropriate + cd build ../configure ### Build and rebuild -In order to build and run it, from the appropriate build subdir, run these: +In order to build Schism, from the build folder, run: make - ../schismtracker & + +You should now have an executable in the build folder that you can run from +Windows Explorer, or with + + ./schismtracker.exe + +After the first time, you can usually build Schism again without having to run +`autoreconf` or `../configure` again, but if you run into problems, follow the +steps from "Configure schismtracker to build" onwards again. ### Compilation problems The configure script should give hints on what is missing to compile. If you've -followed the steps, everything should already be in the place, but in case it -doesn't, see the config.log file, which reports a detailed output (more than -what is seen on the screen) that could help identify what is missing, or which +followed the steps, everything should already be in the right place, but in case +it doesn't work, see the config.log file, which reports a detailed output (more +than what is seen on the screen) that could help identify what is missing, or which option is not working. - ### Debugging -When installing the toolchains, the gdb debugger is also installed. Run it -from the win32 shell to debug the 32bit exe, or run it from the Win64 shell to -debug the 64bit one. +When installing the toolchains, the gdb debugger is also installed. You can run this +from the MSYS2 MINGW64 shell if you need to debug Schism. - -## Prepare the distribution file +## Preparing for distribution or sharing to other machines To distribute the application, it is important to bundle the correct version of -the SDL.dll file with the executable. - -For a 32bit build, the file is located in /msys2_path/mingw32/bin/SDL.dll -For a 64bit build, the file is located in /msys2_path/mingw64/bin/SDL.dll - -The 32bit build also requires the files -/msys2_path/mingw64/bin/libgcc_s_dw2-1.dll and -/msys2_path/mingw64/bin/libwinpthread-1.dll +the SDL.dll file with the executable. For a 64bit build, the file is located in +`/msys2_path/mingw64/bin/SDL.dll` If you want to reduce the exe size (removing the debugging information), use -the following command: - -_(note: you MUST do this from the same shell than you used to build the -executable, as the strip tool is architecture-dependent)_ +the following command from MSYS2 MINGW64: strip -g schismtracker.exe - - -## SDL2 notes - -The current version of schismtracker uses SDL1, but a fork with SDL2 has been -made here https://github.com/davvid/schismtracker/tree/laptop-octave - -In order to build that branch, installing the SDL2 packages AND pkg-config is -needed - - pacman -S mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_gfx mingw-w64-i686-pkg-config mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_gfx mingw-w64-x86_64-pkg-config diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/docs/configuration.md new/schismtracker-20221020/docs/configuration.md --- old/schismtracker-20220905/docs/configuration.md 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/docs/configuration.md 2022-10-20 17:51:29.000000000 +0200 @@ -47,9 +47,8 @@ `width` and `height` are the initial dimensions to use for the window, and the dimensions to return to when toggling fullscreen off. -If you are having problems with fullscreen aspect ratio, you can try setting -`want_fixed` to 1. This will attempt to "correct" the fullscreen resolution -used by Schism. +If `want_fixed` is set to 1, Schism will be displayed with a 4:3 aspect ratio +regardless of the actual window size. #### Backups @@ -68,8 +67,7 @@ Alter the key repeat. "Delay" is how long before keys begin to repeat, "rate" is how long between repeated keystrokes. (Both are in milliseconds.) Above are -[Storlek](https://github.com/schismtracker/schismtracker/wiki/Storlek)'s -settings, which are very fast but convenient for speed tracking. +Storlek's settings, which are very fast but convenient for speed tracking. The *default* repeat delay and rate come from your operating system, so you only need to set this if you like having a different rate for Schism Tracker @@ -167,7 +165,9 @@ `driver=alsa:dmix` to get Schism Tracker to play with other programs. (However, Alsa completely ignores the latency with dmix so it might cause massive delays between pressing a note and hearing it, which is why Schism Tracker requests a -"real" device by default.) +"real" device by default.) If neither the `driver` nor `--audio-driver` is set, +the `SDL_AUDIODRIVER`, `AUDIODEV` and `SDL_PATH_DSP` environment variables can +be used to configure Schism's audio output. [Diskwriter] rate=96000 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/include/it.h new/schismtracker-20221020/include/it.h --- old/schismtracker-20220905/include/it.h 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/include/it.h 2022-10-20 17:51:29.000000000 +0200 @@ -246,6 +246,7 @@ extern char cfg_video_interpolation[]; /* TODO: consolidate these into cfg_video_flags */ extern int cfg_video_fullscreen; +extern int cfg_video_want_fixed; extern int cfg_video_mousecursor; extern int cfg_video_width, cfg_video_height; @@ -455,6 +456,9 @@ void memused_get_pattern_saved(unsigned int *a, unsigned int *b); /* wtf */ +/* Shutdown the SDL2 system from anywhere without having to use atexit() */ +void schism_exit(int status); + /* --------------------------------------------------------------------- */ #endif /* ! IT_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/schism/audio_playback.c new/schismtracker-20221020/schism/audio_playback.c --- old/schismtracker-20220905/schism/audio_playback.c 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/schism/audio_playback.c 2022-10-20 17:51:29.000000000 +0200 @@ -96,7 +96,7 @@ static char active_audio_driver[256]; /* Whatever was in the config file. This is used if no driver is given to audio_setup. */ -static char cfg_audio_driver[256]; +static char cfg_audio_driver[256] = { 0 }; /* Required for updating SDL1.2 -> SDL2 on Windows (WASAPI) */ static SDL_AudioDeviceID audio_dev; @@ -1249,9 +1249,6 @@ { char *driver = NULL, *device = NULL; - unset_env_var("AUDIODEV"); - unset_env_var("SDL_PATH_DSP"); - if (!*driver_spec) { unset_env_var("SDL_AUDIODRIVER"); } else if (str_break(driver_spec, ':', &driver, &device)) { @@ -1288,7 +1285,9 @@ 'verbose' => print stuff to the log about what device/driver was configured */ static int _audio_open(const char *driver_spec, int verbose) { - _audio_set_envvars(driver_spec); + if (!(getenv("SDL_AUDIODRIVER") || getenv("AUDIODEV") || getenv("SDL_PATH_DSP")) + && (cfg_audio_driver[0] == '\0')) + _audio_set_envvars(driver_spec); if (SDL_WasInit(SDL_INIT_AUDIO)) SDL_QuitSubSystem(SDL_INIT_AUDIO); @@ -1412,7 +1411,7 @@ fprintf(stderr, "%s: %s\n", driver_spec, err); fprintf(stderr, "%s\n", err_default); fprintf(stderr, "Couldn't initialise audio!\n"); - exit(1); + schism_exit(1); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/schism/config.c new/schismtracker-20221020/schism/config.c --- old/schismtracker-20220905/schism/config.c 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/schism/config.c 2022-10-20 17:51:29.000000000 +0200 @@ -40,6 +40,7 @@ cfg_dir_dotschism[PATH_MAX + 1], cfg_font[NAME_MAX + 1]; char cfg_video_interpolation[8]; int cfg_video_fullscreen = 0; +int cfg_video_want_fixed = 0; int cfg_video_mousecursor = MOUSE_EMULATED; int cfg_video_width, cfg_video_height; @@ -136,6 +137,7 @@ cfg_video_width = cfg_get_number(&cfg, "Video", "width", 640); cfg_video_height = cfg_get_number(&cfg, "Video", "height", 400); cfg_video_fullscreen = !!cfg_get_number(&cfg, "Video", "fullscreen", 0); + cfg_video_want_fixed = cfg_get_number(&cfg, "Video", "want_fixed", 0); cfg_video_mousecursor = cfg_get_number(&cfg, "Video", "mouse_cursor", MOUSE_EMULATED); cfg_video_mousecursor = CLAMP(cfg_video_mousecursor, 0, MOUSE_MAX_STATE); ptr = cfg_get_string(&cfg, "Video", "aspect", NULL, 0, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/schism/main.c new/schismtracker-20221020/schism/main.c --- old/schismtracker-20220905/schism/main.c 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/schism/main.c 2022-10-20 17:51:29.000000000 +0200 @@ -112,7 +112,7 @@ return; } fprintf(stderr, "SDL_Init: %s\n", err); - exit(1); + schism_exit(1); } static void display_init(void) @@ -1010,7 +1010,7 @@ #endif if (diskwrite_to) { printf("Diskwrite complete, exiting...\n"); - exit(0); + schism_exit(0); } } } @@ -1022,11 +1022,11 @@ /* nothing */; } } - exit(0); /* atexit :) */ + schism_exit(0); } -static void schism_shutdown(void) +void schism_exit(int status) { #if ENABLE_HOOKS if (shutdown_process & EXIT_HOOK) @@ -1049,17 +1049,17 @@ video_blit(); video_shutdown(); /* - If this is the atexit() handler, why are we calling SDL_Quit? - - Simple, SDL's documentation says always call SDL_Quit. :) In - fact, in the examples they recommend writing atexit(SDL_Quit) - directly after SDL_Init. I'm not sure exactly why, but I don't - see a reason *not* to do it... - / Storlek + Don't use this function as atexit handler, because that will cause + segfault when MESA runs on Wayland or KMS/DRM: Never call SDL_Quit() + inside an atexit handler. + You're probably still on X11 if this has not bitten you yet. + See long-standing bug: https://github.com/libsdl-org/SDL/issues/3184 + / Vanfanel */ SDL_Quit(); } os_sysexit(); + exit(status); } extern void vis_init(void); @@ -1081,7 +1081,6 @@ put_env_var("SCHISM_VIDEO_ASPECT", "full"); vis_init(); - atexit(schism_shutdown); video_fullscreen(0); @@ -1181,8 +1180,9 @@ const char *driver = (strcasestr(diskwrite_to, ".aif") ? (multi ? "MAIFF" : "AIFF") : (multi ? "MWAV" : "WAV")); - if (song_export(diskwrite_to, driver) != SAVE_SUCCESS) - exit(1); // ? + if (song_export(diskwrite_to, driver) != SAVE_SUCCESS) { + schism_exit(1); + } } else if (startup_flags & SF_PLAY) { song_start(); set_page(PAGE_INFO); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/schism/page.c new/schismtracker-20221020/schism/page.c --- old/schismtracker-20220905/schism/page.c 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/schism/page.c 2022-10-20 17:51:29.000000000 +0200 @@ -549,7 +549,7 @@ _mp_finish(NULL); if (k->state == KEY_PRESS) { if (k->mod & KMOD_SHIFT) - exit(0); + schism_exit(0); show_exit_prompt(); } return 1; @@ -1716,7 +1716,7 @@ static void exit_ok_confirm(UNUSED void *data) { - exit(0); + schism_exit(0); } static void exit_ok(UNUSED void *data) @@ -1747,7 +1747,7 @@ if (status.current_page == PAGE_ABOUT) { /* haven't even started up yet; don't bother confirming */ - exit(0); + schism_exit(0); } else if (status.current_page == PAGE_FONT_EDIT) { if (status.flags & STARTUP_FONTEDIT) { dialog_create(DIALOG_OK_CANCEL, "Exit Font Editor?", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/schism/page_instruments.c new/schismtracker-20221020/schism/page_instruments.c --- old/schismtracker-20220905/schism/page_instruments.c 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/schism/page_instruments.c 2022-10-20 17:51:29.000000000 +0200 @@ -957,6 +957,8 @@ case 2: /* instrument, first digit */ case 3: /* instrument, second digit */ + if (!k->is_synthetic) + break; if (k->sym.sym == SDLK_SPACE) { ins->sample_map[note_trans_sel_line] = sample_get_current(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/schism/page_orderpan.c new/schismtracker-20221020/schism/page_orderpan.c --- old/schismtracker-20220905/schism/page_orderpan.c 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/schism/page_orderpan.c 2022-10-20 17:51:29.000000000 +0200 @@ -363,7 +363,8 @@ default: c = numeric_key_event(k, 0); if (c == -1) return 0; - if (k->state == KEY_RELEASE) + if (k->state == KEY_RELEASE + || k->is_synthetic) return 1; status.flags |= SONG_NEEDS_SAVE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/schism/page_patedit.c new/schismtracker-20221020/schism/page_patedit.c --- old/schismtracker-20220905/schism/page_patedit.c 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/schism/page_patedit.c 2022-10-20 17:51:29.000000000 +0200 @@ -2778,6 +2778,8 @@ int vp = panning_mode ? VOLFX_PANNING : VOLFX_VOLUME; int q; + if (k->is_synthetic) + return 1; if (pos == 0) { q = kbd_char_to_hex(k); if (q >= 0 && q <= 9) { @@ -3944,6 +3946,8 @@ static int mute_toggle_hack[64]; /* mrsbrisby: please explain this one, i don't get why it's necessary... */ static int pattern_editor_handle_key_default(struct key_event * k) { + if (k->is_synthetic) + return 1; /* bleah */ if (k->sym.sym == SDLK_LESS || k->sym.sym == SDLK_COLON || k->sym.sym == SDLK_SEMICOLON) { if (k->state == KEY_RELEASE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20220905/schism/video.c new/schismtracker-20221020/schism/video.c --- old/schismtracker-20220905/schism/video.c 2022-09-05 19:11:17.000000000 +0200 +++ new/schismtracker-20221020/schism/video.c 2022-10-20 17:51:29.000000000 +0200 @@ -252,11 +252,13 @@ if (!SDL_GetHint(SDL_HINT_RENDER_SCALE_QUALITY)) SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, cfg_video_interpolation); + SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0"); + if (!video.width_height_defined) { video.x = SDL_WINDOWPOS_UNDEFINED; video.y = SDL_WINDOWPOS_UNDEFINED; - video.fullscreen.width = video.prev.width = video.width = NATIVE_SCREEN_WIDTH; - video.fullscreen.height = video.prev.height = video.height = NATIVE_SCREEN_HEIGHT; + video.fullscreen.width = video.prev.width = video.width = cfg_video_width; + video.fullscreen.height = video.prev.height = video.height = cfg_video_height; } SDL_CreateWindowAndRenderer(video.width, video.height, SDL_WINDOW_RESIZABLE, &video.window, &video.renderer); @@ -276,7 +278,13 @@ void video_resize(unsigned int width, unsigned int height) { - SDL_RenderSetLogicalSize(video.renderer, width, height); + /* Aspect ratio correction if it's wanted */ + if (cfg_video_want_fixed) + SDL_RenderSetLogicalSize(video.renderer, + NATIVE_SCREEN_WIDTH * 5, NATIVE_SCREEN_HEIGHT * 6); // 4:3 + else + SDL_RenderSetLogicalSize(video.renderer, width, height); + video.prev.width = video.width; video.prev.height = video.height; video.width = width;
