Merge remote-tracking branch 'upstream/master' into fullscreenstaticonqt

This commit is contained in:
Cacodemon345
2022-02-16 16:16:04 +06:00
10 changed files with 87 additions and 26 deletions

View File

@@ -47,18 +47,12 @@ AppDir:
- libqt5core5a
- libqt5gui5
- libqt5widgets5
- librtmidi5
- libsdl2-2.0-0
- libslirp0
- libsndio7.0
- libwayland-client0
- libx11-6
- libx11-xcb1
- libxcb-render0
- libxcb-shape0
- libxcb-shm0
- libxcb-xfixes0
- libxcb1
- zlib1g
files:
exclude:
- etc
@@ -66,6 +60,7 @@ AppDir:
- opt/libc/usr/share
- usr/bin
- usr/include
- usr/lib/*/libasound.so.*
- usr/lib/cmake
- usr/lib/pkgconfig
- usr/sbin
@@ -90,6 +85,7 @@ AppDir:
- usr/share/pkgconfig
- usr/share/poppler
- usr/share/readline
- usr/share/rtmidi
- usr/share/sounds
- usr/share/X11
- usr/share/xml

View File

@@ -427,6 +427,8 @@ then
# TBD
:
else
cwd_root=$(pwd)
# Build openal-soft 1.21.1 manually to fix audio issues. This is a temporary
# workaround until a newer version of openal-soft trickles down to Debian repos.
if [ -d "openal-soft-1.21.1" ]
@@ -435,11 +437,44 @@ else
else
wget -qO - https://github.com/kcat/openal-soft/archive/refs/tags/1.21.1.tar.gz | tar zxf -
fi
cwd_root=$(pwd)
cd openal-soft-1.21.1/build
[ -e Makefile ] && make clean
cmake -G "Unix Makefiles" -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" ..
make -j$(nproc) install
cd ../..
make -j$(nproc) install || exit 99
cd "$cwd_root"
# Build rtmidi without JACK support to remove the dependency on libjack.
if [ -d "rtmidi-4.0.0" ]
then
rm -rf rtmidi-4.0.0/CMakeCache.txt rtmidi-4.0.0/CMakeFiles
else
wget -qO - http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz | tar zxf -
fi
cwd_root=$(pwd)
cd rtmidi-4.0.0
[ -e Makefile ] && make clean
cmake -G "Unix Makefiles" -D RTMIDI_API_JACK=OFF -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" .
make -j$(nproc) install || exit 99
cd "$cwd_root"
# Build SDL2 for joystick support with most components disabled to remove the dependencies on PulseAudio and libdrm.
if [ ! -d "SDL2-2.0.20" ]
then
wget -qO - https://www.libsdl.org/release/SDL2-2.0.20.tar.gz | tar zxf -
fi
rm -rf sdlbuild
mkdir sdlbuild
cd sdlbuild
cmake -G "Unix Makefiles" -D SDL_DISKAUDIO=OFF -D SDL_DIRECTFB_SHARED=OFF -D SDL_OPENGL=OFF -D SDL_OPENGLES=OFF -D SDL_OSS=OFF -D SDL_ALSA=OFF \
-D SDL_ALSA_SHARED=OFF -D SDL_JACK=OFF -D SDL_JACK_SHARED=OFF -D SDL_ESD=OFF -D SDL_ESD_SHARED=OFF -D SDL_PIPEWIRE=OFF -D SDL_PIPEWIRE_SHARED=OFF \
-D SDL_PULSEAUDIO=OFF -D SDL_PULSEAUDIO_SHARED=OFF -D SDL_ARTS=OFF -D SDL_ARTS_SHARED=OFF -D SDL_NAS=OFF -D SDL_NAS_SHARED=OFF -D SDL_SNDIO=OFF \
-D SDL_SNDIO_SHARED=OFF -D SDL_FUSIONSOUND=OFF -D SDL_FUSIONSOUND_SHARED=OFF -D SDL_LIBSAMPLERATE=OFF -D SDL_LIBSAMPLERATE_SHARED=OFF -D SDL_X11=OFF \
-D SDL_X11_SHARED=OFF -D SDL_WAYLAND=OFF -D SDL_WAYLAND_SHARED=OFF -D SDL_WAYLAND_LIBDECOR=OFF -D SDL_WAYLAND_LIBDECOR_SHARED=OFF \
-D SDL_WAYLAND_QT_TOUCH=OFF -D SDL_RPI=OFF -D SDL_VIVANTE=OFF -D SDL_VULKAN=OFF -D SDL_KMSDRM=OFF -D SDL_KMSDRM_SHARED=OFF -D SDL_OFFSCREEN=OFF \
-D SDL_HIDAPI_JOYSTICK=ON -D SDL_VIRTUAL_JOYSTICK=ON -D SDL_SHARED=ON -D SDL_STATIC=OFF -S "$cwd_root/SDL2-2.0.20" \
-D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr"
make -j$(nproc) install || exit 99
cd "$cwd_root"
# Archive Discord Game SDK library.
7z e -y -o"archive_tmp/usr/lib" discord_game_sdk.zip "lib/$arch_discord/discord_game_sdk.so"

View File

@@ -46,10 +46,13 @@
#define COPYRIGHT_YEAR "@EMU_COPYRIGHT_YEAR@"
/* Web URL info. */
#define EMU_SITE L"86box.net"
#define EMU_ROMS_URL L"https://github.com/86Box/roms/releases/latest"
#define EMU_SITE "86box.net"
#define EMU_SITE_W LSTR(EMU_SITE)
#define EMU_ROMS_URL "https://github.com/86Box/roms/releases/latest"
#define EMU_ROMS_URL_W LSTR(EMU_ROMS_URL)
#ifdef RELEASE_BUILD
# define EMU_DOCS_URL L"https://86box.readthedocs.io/en/v@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@/"
# define EMU_DOCS_URL "https://86box.readthedocs.io/en/v@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@/"
#else
# define EMU_DOCS_URL L"https://86box.readthedocs.io"
# define EMU_DOCS_URL "https://86box.readthedocs.io"
#endif
#define EMU_DOCS_URL_W LSTR(EMU_DOCS_URL)

View File

@@ -35,10 +35,13 @@
#define COPYRIGHT_YEAR "2022"
/* Web URL info. */
#define EMU_SITE L"86box.net"
#define EMU_ROMS_URL L"https://github.com/86Box/roms/releases/latest"
#define EMU_SITE "86box.net"
#define EMU_SITE_W LSTR(EMU_SITE)
#define EMU_ROMS_URL "https://github.com/86Box/roms/releases/latest"
#define EMU_ROMS_URL_W LSTR(EMU_ROMS_URL)
#ifdef RELEASE_BUILD
# define EMU_DOCS_URL L"https://86box.readthedocs.io/en/v3.0/"
# define EMU_DOCS_URL "https://86box.readthedocs.io/en/v3.2/"
#else
# define EMU_DOCS_URL L"https://86box.readthedocs.io"
# define EMU_DOCS_URL "https://86box.readthedocs.io"
#endif
#define EMU_DOCS_URL_W LSTR(EMU_DOCS_URL)

View File

@@ -1434,10 +1434,10 @@ void MainWindow::on_actionAbout_86Box_triggered()
msgBox.setInformativeText(tr("An emulator of old computers\n\nAuthors: Sarah Walker, Miran Grca, Fred N. van Kempen (waltje), SA1988, Tiseno100, reenigne, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information."));
msgBox.setWindowTitle("About 86Box");
msgBox.addButton("OK", QMessageBox::ButtonRole::AcceptRole);
auto webSiteButton = msgBox.addButton("86box.net", QMessageBox::ButtonRole::HelpRole);
auto webSiteButton = msgBox.addButton(EMU_SITE_W, QMessageBox::ButtonRole::HelpRole);
webSiteButton->connect(webSiteButton, &QPushButton::released, []()
{
QDesktopServices::openUrl(QUrl("https://86box.net/"));
QDesktopServices::openUrl(QUrl("https://" EMU_SITE));
});
#ifdef RELEASE_BUILD
msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-green.ico").pixmap(32, 32));
@@ -1454,7 +1454,7 @@ void MainWindow::on_actionAbout_86Box_triggered()
void MainWindow::on_actionDocumentation_triggered()
{
QDesktopServices::openUrl(QUrl("https://86box.readthedocs.io"));
QDesktopServices::openUrl(QUrl(EMU_DOCS_URL));
}
void MainWindow::on_actionCGA_PCjr_Tandy_EGA_S_VGA_overscan_triggered() {

View File

@@ -669,6 +669,9 @@
<property name="toolTip">
<string>ACPI Shutdown</string>
</property>
<property name="visible">
<bool>false</bool>
</property>
</action>
<action name="actionBegin_trace">
<property name="text">

View File

@@ -34,6 +34,7 @@ extern MainWindow* main_window;
extern "C"
{
#include <X11/Xlib.h>
#include <X11/keysym.h>
#include <X11/extensions/XInput2.h>
#include <unistd.h>
#include <fcntl.h>
@@ -50,7 +51,7 @@ static QThread* procThread = nullptr;
static bool xi2childinit = false;
static XIEventMask ximask;
static std::atomic<bool> exitfromthread = false;
static std::atomic<double> xi2_mouse_x = 0, xi2_mouse_y = 0;
static std::atomic<double> xi2_mouse_x = 0, xi2_mouse_y = 0, xi2_mouse_abs_x = 0, xi2_mouse_abs_y = 0;
static int xi2opcode = 0;
static double prev_rel_coords[2] = { 0., 0. };
static Time prev_time = 0;
@@ -91,6 +92,7 @@ void xinput2_proc()
XISetMask(ximask.mask, XI_RawButtonPress);
XISetMask(ximask.mask, XI_RawButtonRelease);
XISetMask(ximask.mask, XI_RawMotion);
if (XKeysymToKeycode(disp, XK_Home) == 69) XISetMask(ximask.mask, XI_Motion);
XISelectEvents(disp, win, &ximask, 1);
@@ -119,6 +121,18 @@ void xinput2_proc()
prev_rel_coords[1] = relative_coords[1];
prev_time = rawev->time;
}
case XI_Motion: {
if (XKeysymToKeycode(disp, XK_Home) == 69) {
// No chance we will get raw motion events on VNC.
const XIDeviceEvent *motionev = (const XIDeviceEvent*)cookie->data;
if (xi2_mouse_abs_x != 0 || xi2_mouse_abs_y != 0) {
xi2_mouse_x = xi2_mouse_x + (motionev->event_x - xi2_mouse_abs_x);
xi2_mouse_y = xi2_mouse_y + (motionev->event_y - xi2_mouse_abs_y);
}
xi2_mouse_abs_x = motionev->event_x;
xi2_mouse_abs_y = motionev->event_y;
}
}
}
}

View File

@@ -63,5 +63,5 @@ AboutDialogCreate(HWND hwnd)
TaskDialogIndirect(&tdconfig, &i, NULL, NULL);
if (i == IDOK)
ShellExecute(hwnd, L"open", L"https://" EMU_SITE, NULL, NULL, SW_SHOW);
ShellExecute(hwnd, L"open", L"https://" EMU_SITE_W, NULL, NULL, SW_SHOW);
}

View File

@@ -120,7 +120,7 @@ ToolBarUpdatePause(int pause)
static TBBUTTON buttons[] = {
{ PAUSE, IDM_ACTION_PAUSE, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, 0 },
{ HARD_RESET, IDM_ACTION_HRESET, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, 0 },
{ ACPI_SHUTDOWN, 0, TBSTATE_INDETERMINATE, BTNS_BUTTON, { 0 }, 0, 0 },
{ ACPI_SHUTDOWN, 0, TBSTATE_HIDDEN, BTNS_BUTTON, { 0 }, 0, 0 },
{ 0, 0, TBSTATE_INDETERMINATE, BTNS_SEP, { 0 }, 0, 0 },
{ CTRL_ALT_DEL, IDM_ACTION_RESET_CAD, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, 0 },
{ CTRL_ALT_ESC, IDM_ACTION_CTRL_ALT_ESC, TBSTATE_ENABLED, BTNS_BUTTON, { 0 }, 0, 0 },

View File

@@ -575,7 +575,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
break;
case IDM_DOCS:
ShellExecute(hwnd, L"open", EMU_DOCS_URL, NULL, NULL, SW_SHOW);
ShellExecute(hwnd, L"open", EMU_DOCS_URL_W, NULL, NULL, SW_SHOW);
break;
case IDM_UPDATE_ICONS:
@@ -1172,6 +1172,7 @@ ui_init(int nCmdShow)
int bRet;
TASKDIALOGCONFIG tdconfig = {0};
TASKDIALOG_BUTTON tdbuttons[] = {{IDCANCEL, MAKEINTRESOURCE(IDS_2119)}};
uint32_t helper_lang;
/* Load DPI related Windows 10 APIs */
user32_handle = dynld_module("user32.dll", user32_imports);
@@ -1205,6 +1206,12 @@ ui_init(int nCmdShow)
return(6);
}
/* Load the desired language */
helper_lang = lang_id;
lang_id = 0;
set_language(helper_lang);
win_settings_open(NULL);
return(0);
}
@@ -1322,7 +1329,7 @@ ui_init(int nCmdShow)
}
/* Load the desired language */
uint32_t helper_lang = lang_id;
helper_lang = lang_id;
lang_id = 0;
set_language(helper_lang);