Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixups #7825

Merged
merged 2 commits into from Mar 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion rpcs3/Emu/Cell/PPUFunction.h
Expand Up @@ -9,7 +9,7 @@ using ppu_function_t = bool(*)(ppu_thread&);
const auto old_f = ppu.current_function;\
if (!old_f) ppu.last_function = #func;\
ppu.current_function = #func;\
ppu.syscall_r3 = ppu.gpr[3];\
std::memcpy(ppu.syscall_args, ppu.gpr + 3, sizeof(ppu.syscall_args)); \
ppu_func_detail::do_call(ppu, func);\
ppu.current_function = old_f;\
ppu.cia += 4;\
Expand Down
4 changes: 3 additions & 1 deletion rpcs3/Emu/Cell/PPUThread.cpp
Expand Up @@ -432,7 +432,9 @@ std::string ppu_thread::dump() const
ret += "Current function: ";
ret += _func;
ret += '\n';
fmt::append(ret, "syscall r3: 0x%llx\n", syscall_r3);

for (u32 i = 3; i <= 6; i++)
fmt::append(ret, " ** GPR[%d] = 0x%llx\n", i, syscall_args[i - 3]);
}
else if (is_paused())
{
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/Cell/PPUThread.h
Expand Up @@ -189,7 +189,7 @@ class ppu_thread : public cpu_thread
cmd64 cmd_get(u32 index) { return cmd_queue[cmd_queue.peek() + index].load(); }

u64 start_time{0}; // Sleep start timepoint
u64 syscall_r3{0}; // Save r3 before syscalls
alignas(64) u64 syscall_args[4]{0}; // Last syscall arguments stored
const char* current_function{}; // Current function name for diagnosis, optimized for speed.
const char* last_function{}; // Sticky copy of current_function, is not cleared on function return

Expand Down
8 changes: 7 additions & 1 deletion rpcs3/rpcs3qt/game_compatibility.cpp
Expand Up @@ -7,6 +7,12 @@
#include <QJsonDocument>
#include <QThread>

#define NOMINMAX
#ifndef CURL_STATICLIB
#define CURL_STATICLIB
#endif
#include <curl/curl.h>

LOG_CHANNEL(compat_log, "Compat");

constexpr auto qstr = QString::fromStdString;
Expand Down Expand Up @@ -69,7 +75,7 @@ size_t game_compatibility::update_buffer(char* data, size_t size)
}

Q_EMIT signal_buffer_update(static_cast<int>(new_size), max);

return size;
}

Expand Down
6 changes: 1 addition & 5 deletions rpcs3/rpcs3qt/game_compatibility.h
Expand Up @@ -5,10 +5,6 @@
#include <QPainter>
#include <QJsonObject>

#define NOMINMAX
#define CURL_STATICLIB
#include <curl/curl.h>

class gui_settings;
class progress_dialog;

Expand Down Expand Up @@ -44,7 +40,7 @@ class game_compatibility : public QObject
std::atomic<bool> m_curl_result = false;
std::atomic<bool> m_curl_abort = false;
double m_actual_dwnld_size = -1.0;
CURL *m_curl = nullptr;
void* m_curl = nullptr;
QByteArray m_curl_buf;
progress_dialog* m_progress_dialog = nullptr;
std::shared_ptr<gui_settings> m_xgui_settings;
Expand Down
5 changes: 5 additions & 0 deletions rpcs3/rpcs3qt/update_manager.cpp
Expand Up @@ -31,6 +31,11 @@
#include <sys/stat.h>
#endif

#ifndef CURL_STATICLIB
#define CURL_STATICLIB
#endif
#include <curl/curl.h>

LOG_CHANNEL(update_log, "UPDATER");

size_t curl_write_cb(char* ptr, size_t /*size*/, size_t nmemb, void* userdata)
Expand Down
5 changes: 1 addition & 4 deletions rpcs3/rpcs3qt/update_manager.h
@@ -1,9 +1,6 @@
#pragma once

#include "stdafx.h"
#define NOMINMAX
#define CURL_STATICLIB
#include <curl/curl.h>
#include <QObject>
#include <QByteArray>

Expand All @@ -21,7 +18,7 @@ class update_manager final : public QObject
progress_dialog* m_progress_dialog = nullptr;
QWidget* m_parent = nullptr;

CURL *m_curl = nullptr;
void* m_curl = nullptr;
QByteArray m_curl_buf;
std::atomic<bool> m_curl_abort = false;
std::atomic<bool> m_curl_result = false;
Expand Down