mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
Fix some warnings
This commit is contained in:
parent
315d9c308b
commit
58140e1d3a
@ -971,7 +971,7 @@ error_code sys_usbd_transfer_data(ppu_thread& ppu, u32 handle, u32 id_pipe, vm::
|
||||
// Claiming interface
|
||||
switch (request->bmRequestType)
|
||||
{
|
||||
case LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE:
|
||||
case 0U /*silences warning*/ | LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE:
|
||||
{
|
||||
switch (request->bRequest)
|
||||
{
|
||||
@ -985,7 +985,7 @@ error_code sys_usbd_transfer_data(ppu_thread& ppu, u32 handle, u32 id_pipe, vm::
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE:
|
||||
case 0U /*silences warning*/ | LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE:
|
||||
{
|
||||
if (!buf)
|
||||
{
|
||||
|
@ -283,14 +283,14 @@ void usb_device_emulated::control_transfer(u8 bmRequestType, u8 bRequest, u16 wV
|
||||
|
||||
switch (bmRequestType)
|
||||
{
|
||||
case LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE:
|
||||
case 0U /*silences warning*/ | LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE:
|
||||
switch (bRequest)
|
||||
{
|
||||
case LIBUSB_REQUEST_SET_CONFIGURATION: usb_device::set_configuration(::narrow<u8>(wValue)); break;
|
||||
default: sys_usbd.error("Unhandled control transfer(0x%02x): 0x%02x", bmRequestType, bRequest); break;
|
||||
}
|
||||
break;
|
||||
case LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE:
|
||||
case 0U /*silences warning*/ | LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE:
|
||||
switch (bRequest)
|
||||
{
|
||||
case LIBUSB_REQUEST_GET_STATUS: transfer->expected_count = get_status(false, false, buf, buf_size); break;
|
||||
|
@ -1968,7 +1968,7 @@ namespace vm
|
||||
|
||||
range_lock->store(begin | (u64{size} << 32));
|
||||
|
||||
for (u64 i = 0;; i++)
|
||||
while (true)
|
||||
{
|
||||
const u64 lock_val = g_range_lock.load();
|
||||
const u64 is_share = g_shmem[begin >> 16].load();
|
||||
|
@ -57,6 +57,6 @@ void gl::set_swapinterval(int interval)
|
||||
//No existing drawable or missing swap extension, EGL?
|
||||
rsx_log.error("Failed to set swap interval");
|
||||
#else
|
||||
rsx_log.error("Swap control not implemented for this platform. Vsync options not available.");
|
||||
rsx_log.error("Swap control not implemented for this platform. Vsync options not available. (interval=%d)", interval);
|
||||
#endif
|
||||
}
|
||||
|
@ -84,26 +84,29 @@ namespace rsx
|
||||
|
||||
resource_config::resource_config()
|
||||
{
|
||||
texture_resource_files.emplace_back("fade_top.png");
|
||||
texture_resource_files.emplace_back("fade_bottom.png");
|
||||
texture_resource_files.emplace_back("select.png");
|
||||
texture_resource_files.emplace_back("start.png");
|
||||
texture_resource_files.emplace_back("cross.png");
|
||||
texture_resource_files.emplace_back("circle.png");
|
||||
texture_resource_files.emplace_back("triangle.png");
|
||||
texture_resource_files.emplace_back("square.png");
|
||||
texture_resource_files.emplace_back("L1.png");
|
||||
texture_resource_files.emplace_back("R1.png");
|
||||
texture_resource_files.emplace_back("L2.png");
|
||||
texture_resource_files.emplace_back("R2.png");
|
||||
texture_resource_files.emplace_back("save.png");
|
||||
texture_resource_files.emplace_back("new.png");
|
||||
texture_resource_files.emplace_back("spinner-24.png");
|
||||
}
|
||||
|
||||
void resource_config::load_files()
|
||||
{
|
||||
for (const auto &res : texture_resource_files)
|
||||
const std::array<std::string, 15> texture_resource_files
|
||||
{
|
||||
"fade_top.png",
|
||||
"fade_bottom.png",
|
||||
"select.png",
|
||||
"start.png",
|
||||
"cross.png",
|
||||
"circle.png",
|
||||
"triangle.png",
|
||||
"square.png",
|
||||
"L1.png",
|
||||
"R1.png",
|
||||
"L2.png",
|
||||
"R2.png",
|
||||
"save.png",
|
||||
"new.png",
|
||||
"spinner-24.png"
|
||||
};
|
||||
for (const std::string& res : texture_resource_files)
|
||||
{
|
||||
// First check the global config dir
|
||||
const std::string image_path = fs::get_config_dir() + "Icons/ui/" + res;
|
||||
|
@ -66,7 +66,6 @@ namespace rsx
|
||||
};
|
||||
|
||||
// Define resources
|
||||
std::vector<std::string> texture_resource_files;
|
||||
std::vector<std::unique_ptr<image_info>> texture_raw_data;
|
||||
|
||||
resource_config();
|
||||
|
@ -3218,7 +3218,10 @@ bool Emulator::IsPathInsideDir(std::string_view path, std::string_view dir) cons
|
||||
return !dir_path.empty() && (GetCallbacks().resolve_path(path) + '/').starts_with((dir_path.back() == '/') ? dir_path : (dir_path + '/'));
|
||||
}
|
||||
|
||||
game_boot_result Emulator::VerifyPathCasing(std::string_view path, std::string_view dir, bool from_dir) const
|
||||
game_boot_result Emulator::VerifyPathCasing(
|
||||
[[maybe_unused]] std::string_view path,
|
||||
[[maybe_unused]] std::string_view dir,
|
||||
[[maybe_unused]] bool from_dir) const
|
||||
{
|
||||
#ifdef _WIN32
|
||||
// path might be passed from command line with differences in uppercase/lowercase on windows.
|
||||
|
@ -369,6 +369,8 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept)
|
||||
m_downloader->update_progress_dialog(tr("Updating RPCS3"));
|
||||
|
||||
#ifdef __APPLE__
|
||||
Q_UNUSED(data);
|
||||
Q_UNUSED(auto_accept);
|
||||
update_log.error("Unsupported operating system.");
|
||||
return false;
|
||||
#else
|
||||
|
@ -111,6 +111,7 @@ namespace utils
|
||||
per_core_usage.resize(utils::get_thread_count());
|
||||
std::fill(per_core_usage.begin(), per_core_usage.end(), 0.0);
|
||||
|
||||
#if defined(_WIN32) || defined(__linux__)
|
||||
const auto string_to_number = [](const std::string& str) -> std::pair<bool, size_t>
|
||||
{
|
||||
std::add_pointer_t<char> eval;
|
||||
@ -284,6 +285,7 @@ namespace utils
|
||||
{
|
||||
perf_log.error("Failed to open /proc/stat (%s)", strerror(errno));
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
total_usage = get_usage();
|
||||
#endif
|
||||
|
@ -622,12 +622,12 @@ namespace utils
|
||||
}
|
||||
#else
|
||||
int vm_overcommit = 0;
|
||||
auto vm_sz = sizeof(int);
|
||||
|
||||
#if defined(__NetBSD__) || defined(__APPLE__)
|
||||
// Always ON
|
||||
vm_overcommit = 0;
|
||||
#elif defined(__FreeBSD__)
|
||||
auto vm_sz = sizeof(int);
|
||||
int mib[2]{CTL_VM, VM_OVERCOMMIT};
|
||||
if (::sysctl(mib, 2, &vm_overcommit, &vm_sz, NULL, 0) != 0)
|
||||
vm_overcommit = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user