fixing build on linux and mac
This commit is contained in:
parent
0d6e8e227a
commit
5c4ac98d49
|
@ -1,12 +1,16 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "sdl_audio.h"
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "core/libraries/error_codes.h"
|
||||
|
||||
#include <SDL3/SDL_audio.h>
|
||||
#include <SDL3/SDL_init.h>
|
||||
#include <SDL3/SDL_timer.h>
|
||||
#include "common/assert.h"
|
||||
#include "core/libraries/error_codes.h"
|
||||
#include "sdl_audio.h"
|
||||
|
||||
#include <mutex> // std::unique_lock
|
||||
|
||||
namespace Audio {
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
#include "core/libraries/kernel/thread_management.h"
|
||||
#include "core/libraries/libs.h"
|
||||
|
||||
#include <algorithm> // std::max, std::min
|
||||
|
||||
namespace Libraries::AvPlayer {
|
||||
|
||||
using namespace Kernel;
|
||||
|
@ -119,11 +117,6 @@ bool PS4_SYSV_ABI sceAvPlayerGetVideoDataEx(SceAvPlayerHandle handle,
|
|||
return res;
|
||||
}
|
||||
|
||||
constexpr u32 GetPriority(u32 base, u32 offset) {
|
||||
// (27D <= base_priority <= 2FC) + offset <= 2FF
|
||||
return std::min(std::min(std::max(637u, base), 764u) + offset, 767u);
|
||||
}
|
||||
|
||||
SceAvPlayerHandle PS4_SYSV_ABI sceAvPlayerInit(SceAvPlayerInitData* data) {
|
||||
LOG_TRACE(Lib_AvPlayer, "called");
|
||||
if (data == nullptr) {
|
||||
|
|
|
@ -69,14 +69,14 @@ s64 AvPlayerFileStreamer::Seek(void* opaque, s64 offset, int whence) {
|
|||
|
||||
if (whence == SEEK_CUR) {
|
||||
self->m_position =
|
||||
std::min(u64(std::max(0i64, s64(self->m_position) + offset)), self->m_file_size);
|
||||
std::min(u64(std::max(s64(0), s64(self->m_position) + offset)), self->m_file_size);
|
||||
return self->m_position;
|
||||
} else if (whence == SEEK_SET) {
|
||||
self->m_position = std::min(u64(std::max(0i64, offset)), self->m_file_size);
|
||||
self->m_position = std::min(u64(std::max(s64(0), offset)), self->m_file_size);
|
||||
return self->m_position;
|
||||
} else if (whence == SEEK_END) {
|
||||
self->m_position =
|
||||
std::min(u64(std::max(0i64, s64(self->m_file_size) + offset)), self->m_file_size);
|
||||
std::min(u64(std::max(s64(0), s64(self->m_file_size) + offset)), self->m_file_size);
|
||||
return self->m_position;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,15 +8,14 @@
|
|||
#include "avplayer_data_streamer.h"
|
||||
|
||||
#include "common/types.h"
|
||||
#include "common/polyfill_thread.h"
|
||||
#include "core/libraries/kernel/thread_management.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <stop_token>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
struct AVCodecContext;
|
||||
struct AVFormatContext;
|
||||
|
|
|
@ -7,12 +7,11 @@
|
|||
#include "avplayer_data_streamer.h"
|
||||
#include "avplayer_source.h"
|
||||
|
||||
#include "common/polyfill_thread.h"
|
||||
#include "core/libraries/kernel/thread_management.h"
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <stop_token>
|
||||
#include <thread>
|
||||
|
||||
namespace Libraries::AvPlayer {
|
||||
|
||||
|
|
|
@ -792,11 +792,10 @@ int PS4_SYSV_ABI sceSaveDataTransferringMount() {
|
|||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceSaveDataUmount(const OrbisSaveDataMountPoint* mountPoint) {
|
||||
if (mountPoint->data == nullptr) {
|
||||
LOG_WARNING(Lib_SaveData, "mountPoint = nullptr");
|
||||
LOG_INFO(Lib_SaveData, "mountPoint = {}", mountPoint->data);
|
||||
if (std::string_view(mountPoint->data).empty()) {
|
||||
return ORBIS_SAVE_DATA_ERROR_NOT_MOUNTED;
|
||||
}
|
||||
LOG_INFO(Lib_SaveData, "mountPoint = {}", mountPoint->data);
|
||||
const auto& mount_dir = Common::FS::GetUserPath(Common::FS::PathType::SaveDataDir) /
|
||||
std::to_string(1) / game_serial / mountPoint->data;
|
||||
auto* mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
|
||||
|
|
Loading…
Reference in New Issue