Merge branch 'master' into vk-patch-constants

This commit is contained in:
kd-11 2025-04-06 23:12:47 +03:00 committed by GitHub
commit f9b8fdd772
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 258 additions and 513 deletions

View file

@ -146,6 +146,7 @@ export MACOSX_DEPLOYMENT_TARGET=14.0
-DCMAKE_TOOLCHAIN_FILE=buildfiles/cmake/TCDarwinARM64.cmake \ -DCMAKE_TOOLCHAIN_FILE=buildfiles/cmake/TCDarwinARM64.cmake \
-DCMAKE_CXX_FLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=140000" \ -DCMAKE_CXX_FLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=140000" \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \
-G Ninja -G Ninja
"$BREW_PATH/bin/ninja"; build_status=$?; "$BREW_PATH/bin/ninja"; build_status=$?;

View file

@ -109,6 +109,7 @@ export MACOSX_DEPLOYMENT_TARGET=14.0
-DCMAKE_IGNORE_PATH="$BREW_PATH/lib" \ -DCMAKE_IGNORE_PATH="$BREW_PATH/lib" \
-DCMAKE_CXX_FLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=140000" \ -DCMAKE_CXX_FLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=140000" \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \
-G Ninja -G Ninja
"$BREW_PATH/bin/ninja"; build_status=$?; "$BREW_PATH/bin/ninja"; build_status=$?;

View file

@ -25,6 +25,13 @@ if [ "$DEPLOY_APPIMAGE" = "true" ]; then
# Remove libvulkan because it causes issues with gamescope # Remove libvulkan because it causes issues with gamescope
rm -f ./AppDir/usr/lib/libvulkan.so* rm -f ./AppDir/usr/lib/libvulkan.so*
# Remove unused Qt6 libraries
rm -f ./AppDir/usr/lib/libQt6OpenGL.so*
rm -f ./AppDir/usr/lib/libQt6Qml*.so*
rm -f ./AppDir/usr/lib/libQt6Quick.so*
rm -f ./AppDir/usr/lib/libQt6VirtualKeyboard.so*
rm -f ./AppDir/usr/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so*
# Remove git directory containing local commit history file # Remove git directory containing local commit history file
rm -rf ./AppDir/usr/share/rpcs3/git rm -rf ./AppDir/usr/share/rpcs3/git

View file

@ -16,4 +16,4 @@ Submitting your test results for Commercial Games must be done on our forums. Pl
# Contributing # Contributing
Check the [Coding Style Guidelines](https://github.com/RPCS3/rpcs3/wiki/Coding-Style) and [Developer Information](https://github.com/RPCS3/rpcs3/wiki/Developer-Information). If you have any questions, hit us up on our [Discord Server](https://discord.me/RPCS3) in the **#development** channel. Check the [Coding Style Guidelines](https://github.com/RPCS3/rpcs3/wiki/Coding-Style) and [Developer Information](https://github.com/RPCS3/rpcs3/wiki/Developer-Information). If you have any questions, hit us up on our [Discord Server](https://discord.gg/rpcs3) in the **#development** channel.

View file

@ -7,7 +7,7 @@ body:
attributes: attributes:
value: | value: |
# Summary # Summary
Please do not ask for help or report compatibility regressions here, use [RPCS3 Discord server](https://discord.me/RPCS3) or [forums](https://forums.rpcs3.net/) instead. Please do not ask for help or report compatibility regressions here, use [RPCS3 Discord server](https://discord.gg/rpcs3) or [forums](https://forums.rpcs3.net/) instead.
- type: textarea - type: textarea
id: quick-summary id: quick-summary
attributes: attributes:
@ -50,7 +50,7 @@ body:
* Completely close RPCS3 and locate the log file. * Completely close RPCS3 and locate the log file.
RPCS3's Log file will be ```RPCS3.log.gz``` (sometimes shows as RPCS3.log with zip icon) or ```RPCS3.log``` (sometimes shows as RPCS3 wtih notepad icon). RPCS3's Log file will be ```RPCS3.log.gz``` (sometimes shows as RPCS3.log with zip icon) or ```RPCS3.log``` (sometimes shows as RPCS3 wtih notepad icon).
* On Windows it will be in the RPCS3 directory near the executable * On Windows it will be in the ```log``` folder inside your RPCS3 folder.
* On Linux it will be in ```~/.cache/rpcs3/``` * On Linux it will be in ```~/.cache/rpcs3/```
* On MacOS it will be in ```~/Library/Caches/rpcs3```. If you're unable to locate it copy paste the path in Spotlight and hit enter. * On MacOS it will be in ```~/Library/Caches/rpcs3```. If you're unable to locate it copy paste the path in Spotlight and hit enter.
- type: textarea - type: textarea

View file

@ -7,7 +7,7 @@ body:
attributes: attributes:
value: | value: |
# Summary # Summary
Please do not ask for help or report compatibility regressions here, use [RPCS3 Discord server](https://discord.me/RPCS3) or [forums](https://forums.rpcs3.net/) instead. Please do not ask for help or report compatibility regressions here, use [RPCS3 Discord server](https://discord.gg/rpcs3) or [forums](https://forums.rpcs3.net/) instead.
- type: textarea - type: textarea
id: quick-summary id: quick-summary
attributes: attributes:
@ -36,7 +36,7 @@ body:
* Completely close RPCS3 and locate the log file. * Completely close RPCS3 and locate the log file.
RPCS3's Log file will be ```RPCS3.log.gz``` (sometimes shows as RPCS3.log with zip icon) or ```RPCS3.log``` (sometimes shows as RPCS3 wtih notepad icon). RPCS3's Log file will be ```RPCS3.log.gz``` (sometimes shows as RPCS3.log with zip icon) or ```RPCS3.log``` (sometimes shows as RPCS3 wtih notepad icon).
* On Windows it will be in the RPCS3 directory near the executable * On Windows it will be in the ```log``` folder inside your RPCS3 folder.
* On Linux it will be in ```~/.cache/rpcs3/``` * On Linux it will be in ```~/.cache/rpcs3/```
* On MacOS it will be in ```~/Library/Caches/rpcs3```. If you're unable to locate it copy paste the path in Spotlight and hit enter. * On MacOS it will be in ```~/Library/Caches/rpcs3```. If you're unable to locate it copy paste the path in Spotlight and hit enter.
- type: textarea - type: textarea

View file

@ -6,7 +6,7 @@ body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Please do not ask for help or report compatibility regressions here, use [RPCS3 Discord server](https://discord.me/RPCS3) or [forums](https://forums.rpcs3.net/) instead. Please do not ask for help or report compatibility regressions here, use [RPCS3 Discord server](https://discord.gg/rpcs3) or [forums](https://forums.rpcs3.net/) instead.
- type: textarea - type: textarea
id: quick-summary id: quick-summary
attributes: attributes:
@ -31,6 +31,6 @@ body:
* If this feature is something that a game is trying to use, upload a log file for it. * If this feature is something that a game is trying to use, upload a log file for it.
RPCS3's Log file will be ```RPCS3.log.gz``` (sometimes shows as RPCS3.log with zip icon) or ```RPCS3.log``` (sometimes shows as RPCS3 wtih notepad icon). RPCS3's Log file will be ```RPCS3.log.gz``` (sometimes shows as RPCS3.log with zip icon) or ```RPCS3.log``` (sometimes shows as RPCS3 wtih notepad icon).
* On Windows it will be in the RPCS3 directory near the executable * On Windows it will be in the ```log``` folder inside your RPCS3 folder.
* On Linux it will be in ```~/.cache/rpcs3/``` * On Linux it will be in ```~/.cache/rpcs3/```
* On MacOS it will be in ```~/Library/Caches/rpcs3```. If you're unable to locate it copy paste the path in Spotlight and hit enter. * On MacOS it will be in ```~/Library/Caches/rpcs3```. If you're unable to locate it copy paste the path in Spotlight and hit enter.

View file

@ -7,7 +7,7 @@ assignees: ''
--- ---
## Please do not ask for help or report compatibility regressions here, use [RPCS3 Discord server](https://discord.me/RPCS3) or [forums](https://forums.rpcs3.net/) instead. ## Please do not ask for help or report compatibility regressions here, use [RPCS3 Discord server](https://discord.gg/rpcs3) or [forums](https://forums.rpcs3.net/) instead.
You're using the advanced template. You're expected to know what to write in order to fill in all the required information for proper report. You're using the advanced template. You're expected to know what to write in order to fill in all the required information for proper report.

View file

@ -4,7 +4,7 @@ contact_links:
url: https://rpcs3.net/quickstart url: https://rpcs3.net/quickstart
about: Everything you need to know to install and configure emulator, and add games about: Everything you need to know to install and configure emulator, and add games
- name: Ask for help - name: Ask for help
url: https://discord.me/RPCS3 url: https://discord.gg/rpcs3
about: If you have some questions or need help, please use our Discord server instead of GitHub about: If you have some questions or need help, please use our Discord server instead of GitHub
- name: Report game compatibility - name: Report game compatibility
url: https://forums.rpcs3.net/thread-196671.html url: https://forums.rpcs3.net/thread-196671.html

18
.github/PR-BUILD.md vendored
View file

@ -1,18 +0,0 @@
## How to test a PR build
Please take into account, that RPCS3 build usually takes some time (about 15 mins), so you can't access a build if a PR was just submitted.
- Open a PR you want to test
- Scroll to the very bottom and locate the **Checks** section
- Click on **Show all checks**
You are supposed to see something like this
![image](https://user-images.githubusercontent.com/10283761/116630952-2cd99e00-a94c-11eb-933e-986d6020ca92.png)
- Click on __Details__ on either **Cirrus Linux GCC** or **Cirrus Windows**
- Click **View more details on Cirrus CI** at the very bottom
![image](https://user-images.githubusercontent.com/10283761/116631111-5e526980-a94c-11eb-95f7-751e6f15e1ea.png)
- Click on the download button for **Artifact** on the **Artifacts** block
![image](https://user-images.githubusercontent.com/10283761/116631322-bee1a680-a94c-11eb-89a3-be365783582e.png)
- Congratulations! You are now downloading an RPCS3 build for that specific PR.
__Please note that PR builds are not supposed to be stable because they contain new changesets.__

View file

@ -1,3 +0,0 @@
<!-- Please include a summary of the change and which issue is fixed. -->
[How to test this PR](.github/PR-BUILD.md)

2
3rdparty/FAudio vendored

@ -1 +1 @@
Subproject commit 486e33eef3f282e4ce3d29f32ded3e67bacdbe5c Subproject commit 091c6b4693ce507ac48037836a5a884e35cd2860

@ -1 +1 @@
Subproject commit f6864924f76e1a0b4abaefc76ae2ed22b1a8916e Subproject commit 877399b2b2cf21e67554ed9046410f268ce1d1b2

View file

@ -4,7 +4,7 @@ RPCS3
[![Azure Build Status](https://dev.azure.com/nekotekina/nekotekina/_apis/build/status/RPCS3.rpcs3?branchName=master)](https://dev.azure.com/nekotekina/nekotekina/_build?definitionId=8&_a=summary&repositoryFilter=4) [![Azure Build Status](https://dev.azure.com/nekotekina/nekotekina/_apis/build/status/RPCS3.rpcs3?branchName=master)](https://dev.azure.com/nekotekina/nekotekina/_build?definitionId=8&_a=summary&repositoryFilter=4)
[![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/RPCS3/rpcs3/master?label=Cirrus%20CI&logo=cirrus-ci)](https://cirrus-ci.com/github/RPCS3/rpcs3) [![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/RPCS3/rpcs3/master?label=Cirrus%20CI&logo=cirrus-ci)](https://cirrus-ci.com/github/RPCS3/rpcs3)
[![GitHub Actions](https://img.shields.io/github/actions/workflow/status/RPCS3/rpcs3/rpcs3.yml?branch=master&logo=github&label=Actions)](https://github.com/RPCS3/rpcs3/actions/workflows/rpcs3.yml) [![GitHub Actions](https://img.shields.io/github/actions/workflow/status/RPCS3/rpcs3/rpcs3.yml?branch=master&logo=github&label=Actions)](https://github.com/RPCS3/rpcs3/actions/workflows/rpcs3.yml)
[![RPCS3 Discord Server](https://img.shields.io/discord/272035812277878785?color=5865F2&label=RPCS3%20Discord&logo=discord&logoColor=white)](https://discord.me/rpcs3) [![RPCS3 Discord Server](https://img.shields.io/discord/272035812277878785?color=5865F2&label=RPCS3%20Discord&logo=discord&logoColor=white)](https://discord.gg/rpcs3)
The world's first free and open-source PlayStation 3 emulator/debugger, written in C++ for Windows, Linux, macOS and FreeBSD. The world's first free and open-source PlayStation 3 emulator/debugger, written in C++ for Windows, Linux, macOS and FreeBSD.
@ -34,7 +34,7 @@ See [BUILDING.md](BUILDING.md) for more information about how to setup an enviro
Check our friendly [quickstart](https://rpcs3.net/quickstart) guide to make sure your computer meets the minimum system requirements to run RPCS3. Check our friendly [quickstart](https://rpcs3.net/quickstart) guide to make sure your computer meets the minimum system requirements to run RPCS3.
Don't forget to have your graphics driver up to date and to install the [Visual C++ Redistributable Packages for Visual Studio 2019](https://aka.ms/vs/16/release/VC_redist.x64.exe) if you are a Windows user. Don't forget to have your graphics driver up to date and to install the [Visual C++ Redistributable Packages for Visual Studio 2022](https://aka.ms/vs/17/release/VC_redist.x64.exe) if you are a Windows user.
## License ## License

View file

@ -1290,7 +1290,7 @@ void PPUTranslator::VMADDFP(ppu_opcode_t op)
void PPUTranslator::VMAXFP(ppu_opcode_t op) void PPUTranslator::VMAXFP(ppu_opcode_t op)
{ {
const auto [a, b] = get_vrs<f32[4]>(op.va, op.vb); const auto [a, b] = get_vrs<f32[4]>(op.va, op.vb);
set_vr(op.vd, vec_handle_result(bitcast<f32[4]>(bitcast<u32[4]>(fmax(a, b)) & bitcast<u32[4]>(fmax(b, a))))); set_vr(op.vd, vec_handle_result(select(fcmp_ord(a < b) | fcmp_uno(b != b), b, a)));
} }
void PPUTranslator::VMAXSB(ppu_opcode_t op) void PPUTranslator::VMAXSB(ppu_opcode_t op)
@ -1352,7 +1352,7 @@ void PPUTranslator::VMHRADDSHS(ppu_opcode_t op)
void PPUTranslator::VMINFP(ppu_opcode_t op) void PPUTranslator::VMINFP(ppu_opcode_t op)
{ {
const auto [a, b] = get_vrs<f32[4]>(op.va, op.vb); const auto [a, b] = get_vrs<f32[4]>(op.va, op.vb);
set_vr(op.vd, vec_handle_result(bitcast<f32[4]>(bitcast<u32[4]>(fmin(a, b)) | bitcast<u32[4]>(fmin(b, a))))); set_vr(op.vd, vec_handle_result(select(fcmp_ord(a > b) | fcmp_uno(b != b), b, a)));
} }
void PPUTranslator::VMINSB(ppu_opcode_t op) void PPUTranslator::VMINSB(ppu_opcode_t op)

View file

@ -483,8 +483,6 @@ namespace vm
} }
} }
bool to_prepare_memory = true;
for (u64 i = 0;; i++) for (u64 i = 0;; i++)
{ {
auto& bits = get_range_lock_bits(true); auto& bits = get_range_lock_bits(true);
@ -512,22 +510,11 @@ namespace vm
if (i < 100) if (i < 100)
{ {
if (to_prepare_memory)
{
// We have some spare time, prepare cache lines (todo: reservation tests here)
utils::prefetch_write(vm::get_super_ptr(addr));
utils::prefetch_write(vm::get_super_ptr(addr) + 64);
to_prepare_memory = false;
}
busy_wait(200); busy_wait(200);
} }
else else
{ {
std::this_thread::yield(); std::this_thread::yield();
// Thread may have been switched or the cache clue has been undermined, cache needs to be prapred again
to_prepare_memory = true;
} }
} }
@ -591,13 +578,6 @@ namespace vm
break; break;
} }
if (to_prepare_memory)
{
utils::prefetch_write(vm::get_super_ptr(addr));
utils::prefetch_write(vm::get_super_ptr(addr) + 64);
to_prepare_memory = false;
}
utils::pause(); utils::pause();
} }
@ -607,13 +587,6 @@ namespace vm
{ {
while (!(ptr->state & cpu_flag::wait)) while (!(ptr->state & cpu_flag::wait))
{ {
if (to_prepare_memory)
{
utils::prefetch_write(vm::get_super_ptr(addr));
utils::prefetch_write(vm::get_super_ptr(addr) + 64);
to_prepare_memory = false;
}
utils::pause(); utils::pause();
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -28,7 +28,7 @@ about_dialog::about_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::about_
connect(ui->website, &QPushButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://rpcs3.net")); }); connect(ui->website, &QPushButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://rpcs3.net")); });
connect(ui->forum, &QPushButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://forums.rpcs3.net")); }); connect(ui->forum, &QPushButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://forums.rpcs3.net")); });
connect(ui->patreon, &QPushButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://rpcs3.net/patreon")); }); connect(ui->patreon, &QPushButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://rpcs3.net/patreon")); });
connect(ui->discord, &QPushButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://discord.me/RPCS3")); }); connect(ui->discord, &QPushButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://discord.gg/rpcs3")); });
connect(ui->wiki, &QPushButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://wiki.rpcs3.net/index.php?title=Main_Page")); }); connect(ui->wiki, &QPushButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://wiki.rpcs3.net/index.php?title=Main_Page")); });
connect(ui->close, &QPushButton::clicked, this, &QWidget::close); connect(ui->close, &QPushButton::clicked, this, &QWidget::close);
} }

View file

@ -2363,7 +2363,7 @@ void game_list_frame::BatchActionBySerials(progress_dialog* pdlg, const std::set
connect(future_watcher, &QFutureWatcher<void>::finished, this, [=, this]() connect(future_watcher, &QFutureWatcher<void>::finished, this, [=, this]()
{ {
pdlg->setLabelText(progressLabel.arg(*index).arg(serials_size)); pdlg->setLabelText(progressLabel.arg(+*index).arg(serials_size));
pdlg->setCancelButtonText(tr("OK")); pdlg->setCancelButtonText(tr("OK"));
QApplication::beep(); QApplication::beep();
@ -2396,7 +2396,7 @@ void game_list_frame::BatchActionBySerials(progress_dialog* pdlg, const std::set
return; return;
} }
pdlg->setLabelText(progressLabel.arg(*index).arg(serials_size)); pdlg->setLabelText(progressLabel.arg(+*index).arg(serials_size));
pdlg->setCancelButtonText(tr("OK")); pdlg->setCancelButtonText(tr("OK"));
connect(pdlg, &progress_dialog::canceled, this, [pdlg](){ pdlg->deleteLater(); }); connect(pdlg, &progress_dialog::canceled, this, [pdlg](){ pdlg->deleteLater(); });
QApplication::beep(); QApplication::beep();

View file

@ -661,9 +661,6 @@ void gs_frame::show()
} }
} }
}); });
// if we do this before show, the QWinTaskbarProgress won't show
m_progress_indicator->show(this);
} }
display_handle_t gs_frame::handle() const display_handle_t gs_frame::handle() const

View file

@ -226,49 +226,6 @@ bool main_window::Init([[maybe_unused]] bool with_cli_boot)
ui->sysPauseAct->setEnabled(enable_play_last); ui->sysPauseAct->setEnabled(enable_play_last);
ui->toolbar_start->setEnabled(enable_play_last); ui->toolbar_start->setEnabled(enable_play_last);
// create tool buttons for the taskbar thumbnail
#ifdef HAS_QT_WIN_STUFF
m_thumb_bar = new QWinThumbnailToolBar(this);
m_thumb_bar->setWindow(windowHandle());
m_thumb_playPause = new QWinThumbnailToolButton(m_thumb_bar);
m_thumb_playPause->setToolTip(start_tooltip);
m_thumb_playPause->setIcon(m_icon_thumb_play);
m_thumb_playPause->setEnabled(enable_play_last);
m_thumb_stop = new QWinThumbnailToolButton(m_thumb_bar);
m_thumb_stop->setToolTip(tr("Stop"));
m_thumb_stop->setIcon(m_icon_thumb_stop);
m_thumb_stop->setEnabled(false);
m_thumb_restart = new QWinThumbnailToolButton(m_thumb_bar);
m_thumb_restart->setToolTip(tr("Restart"));
m_thumb_restart->setIcon(m_icon_thumb_restart);
m_thumb_restart->setEnabled(false);
m_thumb_bar->addButton(m_thumb_playPause);
m_thumb_bar->addButton(m_thumb_stop);
m_thumb_bar->addButton(m_thumb_restart);
RepaintThumbnailIcons();
connect(m_thumb_stop, &QWinThumbnailToolButton::clicked, this, []()
{
gui_log.notice("User clicked the stop button on thumbnail toolbar");
Emu.GracefulShutdown(false, true);
});
connect(m_thumb_restart, &QWinThumbnailToolButton::clicked, this, []()
{
gui_log.notice("User clicked the restart button on thumbnail toolbar");
Emu.Restart();
});
connect(m_thumb_playPause, &QWinThumbnailToolButton::clicked, this, [this]()
{
gui_log.notice("User clicked the playPause button on thumbnail toolbar");
OnPlayOrPause();
});
#endif
// RPCS3 Updater // RPCS3 Updater
QMenu* download_menu = new QMenu(tr("Update Available!")); QMenu* download_menu = new QMenu(tr("Update Available!"));
@ -1868,19 +1825,6 @@ void main_window::RepaintThumbnailIcons()
{ {
return gui::utils::get_colorized_icon(QPixmap::fromImage(gui::utils::get_opaque_image_area(path)), Qt::black, new_color); return gui::utils::get_colorized_icon(QPixmap::fromImage(gui::utils::get_opaque_image_area(path)), Qt::black, new_color);
}; };
#ifdef HAS_QT_WIN_STUFF
if (!m_thumb_bar) return;
m_icon_thumb_play = icon(":/Icons/play.png");
m_icon_thumb_pause = icon(":/Icons/pause.png");
m_icon_thumb_stop = icon(":/Icons/stop.png");
m_icon_thumb_restart = icon(":/Icons/restart.png");
m_thumb_playPause->setIcon(Emu.IsRunning() || Emu.IsStarting() ? m_icon_thumb_pause : m_icon_thumb_play);
m_thumb_stop->setIcon(m_icon_thumb_stop);
m_thumb_restart->setIcon(m_icon_thumb_restart);
#endif
} }
void main_window::RepaintToolBarIcons() void main_window::RepaintToolBarIcons()
@ -1971,12 +1915,6 @@ void main_window::OnEmuRun(bool /*start_playtime*/)
m_debugger_frame->EnableButtons(true); m_debugger_frame->EnableButtons(true);
#ifdef HAS_QT_WIN_STUFF
m_thumb_stop->setToolTip(stop_tooltip);
m_thumb_restart->setToolTip(restart_tooltip);
m_thumb_playPause->setToolTip(pause_tooltip);
m_thumb_playPause->setIcon(m_icon_thumb_pause);
#endif
ui->sysPauseAct->setText(tr("&Pause")); ui->sysPauseAct->setText(tr("&Pause"));
ui->sysPauseAct->setIcon(m_icon_pause); ui->sysPauseAct->setIcon(m_icon_pause);
ui->toolbar_start->setIcon(m_icon_pause); ui->toolbar_start->setIcon(m_icon_pause);
@ -1996,12 +1934,6 @@ void main_window::OnEmuResume() const
const QString pause_tooltip = tr("Pause %0").arg(title); const QString pause_tooltip = tr("Pause %0").arg(title);
const QString stop_tooltip = tr("Stop %0").arg(title); const QString stop_tooltip = tr("Stop %0").arg(title);
#ifdef HAS_QT_WIN_STUFF
m_thumb_stop->setToolTip(stop_tooltip);
m_thumb_restart->setToolTip(restart_tooltip);
m_thumb_playPause->setToolTip(pause_tooltip);
m_thumb_playPause->setIcon(m_icon_thumb_pause);
#endif
ui->sysPauseAct->setText(tr("&Pause")); ui->sysPauseAct->setText(tr("&Pause"));
ui->sysPauseAct->setIcon(m_icon_pause); ui->sysPauseAct->setIcon(m_icon_pause);
ui->toolbar_start->setIcon(m_icon_pause); ui->toolbar_start->setIcon(m_icon_pause);
@ -2015,10 +1947,6 @@ void main_window::OnEmuPause() const
const QString title = GetCurrentTitle(); const QString title = GetCurrentTitle();
const QString resume_tooltip = tr("Resume %0").arg(title); const QString resume_tooltip = tr("Resume %0").arg(title);
#ifdef HAS_QT_WIN_STUFF
m_thumb_playPause->setToolTip(resume_tooltip);
m_thumb_playPause->setIcon(m_icon_thumb_play);
#endif
ui->sysPauseAct->setText(tr("&Resume")); ui->sysPauseAct->setText(tr("&Resume"));
ui->sysPauseAct->setIcon(m_icon_play); ui->sysPauseAct->setIcon(m_icon_play);
ui->toolbar_start->setIcon(m_icon_play); ui->toolbar_start->setIcon(m_icon_play);
@ -2039,10 +1967,6 @@ void main_window::OnEmuStop()
ui->sysPauseAct->setText(tr("&Play")); ui->sysPauseAct->setText(tr("&Play"));
ui->sysPauseAct->setIcon(m_icon_play); ui->sysPauseAct->setIcon(m_icon_play);
#ifdef HAS_QT_WIN_STUFF
m_thumb_playPause->setToolTip(play_tooltip);
m_thumb_playPause->setIcon(m_icon_thumb_play);
#endif
EnableMenus(false); EnableMenus(false);
@ -2061,10 +1985,6 @@ void main_window::OnEmuStop()
ui->toolbar_start->setText(tr("Restart")); ui->toolbar_start->setText(tr("Restart"));
ui->toolbar_start->setToolTip(restart_tooltip); ui->toolbar_start->setToolTip(restart_tooltip);
ui->sysRebootAct->setEnabled(true); ui->sysRebootAct->setEnabled(true);
#ifdef HAS_QT_WIN_STUFF
m_thumb_restart->setToolTip(restart_tooltip);
m_thumb_restart->setEnabled(true);
#endif
} }
ui->batchRemoveShaderCachesAct->setEnabled(true); ui->batchRemoveShaderCachesAct->setEnabled(true);
@ -2106,10 +2026,7 @@ void main_window::OnEmuReady() const
const QString play_tooltip = tr("Play %0").arg(title); const QString play_tooltip = tr("Play %0").arg(title);
m_debugger_frame->EnableButtons(true); m_debugger_frame->EnableButtons(true);
#ifdef HAS_QT_WIN_STUFF
m_thumb_playPause->setToolTip(play_tooltip);
m_thumb_playPause->setIcon(m_icon_thumb_play);
#endif
ui->sysPauseAct->setText(tr("&Play")); ui->sysPauseAct->setText(tr("&Play"));
ui->sysPauseAct->setIcon(m_icon_play); ui->sysPauseAct->setIcon(m_icon_play);
ui->toolbar_start->setIcon(m_icon_play); ui->toolbar_start->setIcon(m_icon_play);
@ -2133,13 +2050,6 @@ void main_window::OnEmuReady() const
void main_window::EnableMenus(bool enabled) const void main_window::EnableMenus(bool enabled) const
{ {
// Thumbnail Buttons
#ifdef HAS_QT_WIN_STUFF
m_thumb_playPause->setEnabled(enabled);
m_thumb_stop->setEnabled(enabled);
m_thumb_restart->setEnabled(enabled);
#endif
// Toolbar // Toolbar
ui->toolbar_start->setEnabled(enabled); ui->toolbar_start->setEnabled(enabled);
ui->toolbar_stop->setEnabled(enabled); ui->toolbar_stop->setEnabled(enabled);
@ -3588,16 +3498,10 @@ void main_window::CreateDockWindows()
ui->toolbar_start->setEnabled(enable_play_buttons); ui->toolbar_start->setEnabled(enable_play_buttons);
ui->sysPauseAct->setEnabled(enable_play_buttons); ui->sysPauseAct->setEnabled(enable_play_buttons);
#ifdef HAS_QT_WIN_STUFF
m_thumb_playPause->setEnabled(enable_play_buttons);
#endif
if (!tooltip.isEmpty()) if (!tooltip.isEmpty())
{ {
ui->toolbar_start->setToolTip(tooltip); ui->toolbar_start->setToolTip(tooltip);
#ifdef HAS_QT_WIN_STUFF
m_thumb_playPause->setToolTip(tooltip);
#endif
} }
} }

View file

@ -1,10 +1,5 @@
#pragma once #pragma once
#ifdef HAS_QT_WIN_STUFF
#include <QWinThumbnailToolBar>
#include <QWinThumbnailToolButton>
#endif
#include <QActionGroup> #include <QActionGroup>
#include <QMainWindow> #include <QMainWindow>
#include <QIcon> #include <QIcon>
@ -61,17 +56,6 @@ class main_window : public QMainWindow
QIcon m_icon_fullscreen_on; QIcon m_icon_fullscreen_on;
QIcon m_icon_fullscreen_off; QIcon m_icon_fullscreen_off;
#ifdef HAS_QT_WIN_STUFF
QIcon m_icon_thumb_play;
QIcon m_icon_thumb_pause;
QIcon m_icon_thumb_stop;
QIcon m_icon_thumb_restart;
QWinThumbnailToolBar *m_thumb_bar = nullptr;
QWinThumbnailToolButton *m_thumb_playPause = nullptr;
QWinThumbnailToolButton *m_thumb_stop = nullptr;
QWinThumbnailToolButton *m_thumb_restart = nullptr;
#endif
enum class drop_type enum class drop_type
{ {
drop_error, drop_error,

View file

@ -131,9 +131,6 @@ void msg_dialog_frame::Create(const std::string& msg, const std::string& title)
// Fix size // Fix size
m_dialog->layout()->setSizeConstraint(QLayout::SetFixedSize); m_dialog->layout()->setSizeConstraint(QLayout::SetFixedSize);
m_dialog->show(); m_dialog->show();
// if we do this before, the QWinTaskbarProgress won't show
if (m_progress_indicator) m_progress_indicator->show(m_dialog->windowHandle());
} }
void msg_dialog_frame::Close(bool success) void msg_dialog_frame::Close(bool success)

View file

@ -51,34 +51,3 @@ void progress_dialog::SignalFailure() const
QApplication::beep(); QApplication::beep();
} }
void progress_dialog::show_progress_indicator()
{
// Try to find a window handle first
QWindow* handle = windowHandle();
for (QWidget* ancestor = this; !handle && ancestor;)
{
ancestor = static_cast<QWidget*>(ancestor->parent());
if (ancestor) handle = ancestor->windowHandle();
}
m_progress_indicator->show(handle);
}
void progress_dialog::setVisible(bool visible)
{
if (visible)
{
if (!isVisible())
{
show_progress_indicator();
}
}
else if (isVisible())
{
m_progress_indicator->hide();
}
QProgressDialog::setVisible(visible);
}

View file

@ -14,10 +14,6 @@ public:
void SetDeleteOnClose(); void SetDeleteOnClose();
void SignalFailure() const; void SignalFailure() const;
void show_progress_indicator();
void setVisible(bool visible) override;
private: private:
std::unique_ptr<progress_indicator> m_progress_indicator; std::unique_ptr<progress_indicator> m_progress_indicator;
}; };

View file

@ -1,106 +1,57 @@
#include "stdafx.h"
#include "progress_indicator.h" #include "progress_indicator.h"
#ifdef HAS_QT_WIN_STUFF #if HAVE_QTDBUS
#include <QCoreApplication>
#include <QWinTaskbarProgress>
#elif HAVE_QTDBUS
#include <QtDBus/QDBusMessage> #include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusConnection> #include <QtDBus/QDBusConnection>
#endif #endif
progress_indicator::progress_indicator(int minimum, int maximum) progress_indicator::progress_indicator(int minimum, int maximum)
{ {
#ifdef HAS_QT_WIN_STUFF
m_tb_button = std::make_unique<QWinTaskbarButton>();
m_tb_button->progress()->setRange(minimum, maximum);
m_tb_button->progress()->setVisible(false);
#else
m_minimum = minimum; m_minimum = minimum;
m_maximum = maximum; m_maximum = maximum;
#if HAVE_QTDBUS #if HAVE_QTDBUS
update_progress(0, true, false); update_progress(0, true, false);
#endif #endif
#endif
} }
progress_indicator::~progress_indicator() progress_indicator::~progress_indicator()
{ {
#ifdef HAS_QT_WIN_STUFF #if HAVE_QTDBUS
// QWinTaskbarProgress::hide() will crash if the application is already about to close, even if the object is not null.
if (!QCoreApplication::closingDown())
{
m_tb_button->progress()->hide();
}
#elif HAVE_QTDBUS
update_progress(0, false, false); update_progress(0, false, false);
#endif #endif
} }
void progress_indicator::show(QWindow* window)
{
#ifdef HAS_QT_WIN_STUFF
m_tb_button->setWindow(window);
m_tb_button->progress()->show();
#else
Q_UNUSED(window);
#endif
}
void progress_indicator::hide()
{
#ifdef HAS_QT_WIN_STUFF
m_tb_button->progress()->hide();
#endif
}
int progress_indicator::value() const int progress_indicator::value() const
{ {
#ifdef HAS_QT_WIN_STUFF
return m_tb_button->progress()->value();
#else
return m_value; return m_value;
#endif
} }
void progress_indicator::set_value(int value) void progress_indicator::set_value(int value)
{ {
#ifdef HAS_QT_WIN_STUFF
m_tb_button->progress()->setValue(std::clamp(value, m_tb_button->progress()->minimum(), m_tb_button->progress()->maximum()));
#else
m_value = std::clamp(value, m_minimum, m_maximum); m_value = std::clamp(value, m_minimum, m_maximum);
#if HAVE_QTDBUS #if HAVE_QTDBUS
update_progress(m_value, true, false); update_progress(m_value, true, false);
#endif #endif
#endif
} }
void progress_indicator::set_range(int minimum, int maximum) void progress_indicator::set_range(int minimum, int maximum)
{ {
#ifdef HAS_QT_WIN_STUFF
m_tb_button->progress()->setRange(minimum, maximum);
#else
m_minimum = minimum; m_minimum = minimum;
m_maximum = maximum; m_maximum = maximum;
#endif
} }
void progress_indicator::reset() void progress_indicator::reset()
{ {
#ifdef HAS_QT_WIN_STUFF
m_tb_button->progress()->reset();
#else
m_value = m_minimum; m_value = m_minimum;
#if HAVE_QTDBUS #if HAVE_QTDBUS
update_progress(m_value, false, false); update_progress(m_value, false, false);
#endif #endif
#endif
} }
void progress_indicator::signal_failure() void progress_indicator::signal_failure()
{ {
#ifdef HAS_QT_WIN_STUFF #if HAVE_QTDBUS
m_tb_button->progress()->stop();
#elif HAVE_QTDBUS
update_progress(0, false, true); update_progress(0, false, true);
#endif #endif
} }

View file

@ -1,20 +1,11 @@
#pragma once #pragma once
#include <QWindow>
#ifdef HAS_QT_WIN_STUFF
#include <QWinTaskbarButton>
#endif
class progress_indicator class progress_indicator
{ {
public: public:
progress_indicator(int minimum, int maximum); progress_indicator(int minimum, int maximum);
~progress_indicator(); ~progress_indicator();
void show(QWindow* window);
void hide();
int value() const; int value() const;
void set_value(int value); void set_value(int value);
@ -23,15 +14,10 @@ public:
void signal_failure(); void signal_failure();
private: private:
#ifdef HAS_QT_WIN_STUFF
std::unique_ptr<QWinTaskbarButton> m_tb_button;
#else
int m_value = 0; int m_value = 0;
int m_minimum = 0; int m_minimum = 0;
int m_maximum = 100; int m_maximum = 100;
#if HAVE_QTDBUS #if HAVE_QTDBUS
void update_progress(int progress, bool progress_visible, bool urgent); void update_progress(int progress, bool progress_visible, bool urgent);
#endif #endif
#endif
}; };

View file

@ -40,7 +40,7 @@ welcome_dialog::welcome_dialog(std::shared_ptr<gui_settings> gui_settings, bool
.arg(gui::utils::make_link(tr("Quickstart"), "https://rpcs3.net/quickstart")) .arg(gui::utils::make_link(tr("Quickstart"), "https://rpcs3.net/quickstart"))
.arg(gui::utils::make_link(tr("FAQ"), "https://rpcs3.net/faq")) .arg(gui::utils::make_link(tr("FAQ"), "https://rpcs3.net/faq"))
.arg(gui::utils::make_link(tr("Forums"), "https://forums.rpcs3.net")) .arg(gui::utils::make_link(tr("Forums"), "https://forums.rpcs3.net"))
.arg(gui::utils::make_link(tr("Discord"), "https://discord.me/RPCS3")))); .arg(gui::utils::make_link(tr("Discord"), "https://discord.gg/rpcs3"))));
#ifdef __APPLE__ #ifdef __APPLE__
ui->create_applications_menu_shortcut->setText(tr("&Create Launchpad shortcut")); ui->create_applications_menu_shortcut->setText(tr("&Create Launchpad shortcut"));