summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--src/common/fs/file.h11
-rw-r--r--src/core/hle/service/hid/hid.cpp11
-rw-r--r--src/video_core/rasterizer_accelerated.cpp6
-rw-r--r--src/video_core/rasterizer_accelerated.h12
5 files changed, 28 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b17bc9c0f..10c5032dc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,11 +13,11 @@ project(yuzu)
13option(ENABLE_SDL2 "Enable the SDL2 frontend" ON) 13option(ENABLE_SDL2 "Enable the SDL2 frontend" ON)
14CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF) 14CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF)
15# On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion 15# On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion
16CMAKE_DEPENDENT_OPTION(YUZU_ALLOW_SYSTEM_SDL2 "Try using system SDL2 before fallling back to one from externals" NOT UNIX "ENABLE_SDL2" OFF) 16option(YUZU_ALLOW_SYSTEM_SDL2 "Try using system SDL2 before fallling back to one from externals" OFF)
17 17
18option(ENABLE_QT "Enable the Qt frontend" ON) 18option(ENABLE_QT "Enable the Qt frontend" ON)
19option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF) 19option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
20CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" MSVC "ENABLE_QT" OFF) 20CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF)
21 21
22option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON) 22option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
23 23
diff --git a/src/common/fs/file.h b/src/common/fs/file.h
index 209f9664b..50e270c5b 100644
--- a/src/common/fs/file.h
+++ b/src/common/fs/file.h
@@ -117,7 +117,7 @@ template <typename Path>
117} 117}
118#endif 118#endif
119 119
120class IOFile final : NonCopyable { 120class IOFile final {
121public: 121public:
122 IOFile(); 122 IOFile();
123 123
@@ -142,7 +142,10 @@ public:
142 FileType type = FileType::BinaryFile, 142 FileType type = FileType::BinaryFile,
143 FileShareFlag flag = FileShareFlag::ShareReadOnly); 143 FileShareFlag flag = FileShareFlag::ShareReadOnly);
144 144
145 virtual ~IOFile(); 145 ~IOFile();
146
147 IOFile(const IOFile&) = delete;
148 IOFile& operator=(const IOFile&) = delete;
146 149
147 IOFile(IOFile&& other) noexcept; 150 IOFile(IOFile&& other) noexcept;
148 IOFile& operator=(IOFile&& other) noexcept; 151 IOFile& operator=(IOFile&& other) noexcept;
@@ -441,8 +444,8 @@ public:
441 444
442private: 445private:
443 std::filesystem::path file_path; 446 std::filesystem::path file_path;
444 FileAccessMode file_access_mode; 447 FileAccessMode file_access_mode{};
445 FileType file_type; 448 FileType file_type{};
446 449
447 std::FILE* file = nullptr; 450 std::FILE* file = nullptr;
448}; 451};
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 49c17fd14..df0fe1c8e 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -1770,7 +1770,7 @@ public:
1770 {232, nullptr, "GetIrSensorState"}, 1770 {232, nullptr, "GetIrSensorState"},
1771 {233, nullptr, "GetXcdHandleForNpadWithIrSensor"}, 1771 {233, nullptr, "GetXcdHandleForNpadWithIrSensor"},
1772 {301, nullptr, "ActivateNpadSystem"}, 1772 {301, nullptr, "ActivateNpadSystem"},
1773 {303, nullptr, "ApplyNpadSystemCommonPolicy"}, 1773 {303, &HidSys::ApplyNpadSystemCommonPolicy, "ApplyNpadSystemCommonPolicy"},
1774 {304, nullptr, "EnableAssigningSingleOnSlSrPress"}, 1774 {304, nullptr, "EnableAssigningSingleOnSlSrPress"},
1775 {305, nullptr, "DisableAssigningSingleOnSlSrPress"}, 1775 {305, nullptr, "DisableAssigningSingleOnSlSrPress"},
1776 {306, nullptr, "GetLastActiveNpad"}, 1776 {306, nullptr, "GetLastActiveNpad"},
@@ -1949,6 +1949,15 @@ public:
1949 1949
1950 RegisterHandlers(functions); 1950 RegisterHandlers(functions);
1951 } 1951 }
1952
1953private:
1954 void ApplyNpadSystemCommonPolicy(Kernel::HLERequestContext& ctx) {
1955 // We already do this for homebrew so we can just stub it out
1956 LOG_WARNING(Service_HID, "called");
1957
1958 IPC::ResponseBuilder rb{ctx, 2};
1959 rb.Push(RESULT_SUCCESS);
1960 }
1952}; 1961};
1953 1962
1954class HidTmp final : public ServiceFramework<HidTmp> { 1963class HidTmp final : public ServiceFramework<HidTmp> {
diff --git a/src/video_core/rasterizer_accelerated.cpp b/src/video_core/rasterizer_accelerated.cpp
index 62d84c0f8..6decd2546 100644
--- a/src/video_core/rasterizer_accelerated.cpp
+++ b/src/video_core/rasterizer_accelerated.cpp
@@ -18,10 +18,10 @@ RasterizerAccelerated::~RasterizerAccelerated() = default;
18void RasterizerAccelerated::UpdatePagesCachedCount(VAddr addr, u64 size, int delta) { 18void RasterizerAccelerated::UpdatePagesCachedCount(VAddr addr, u64 size, int delta) {
19 const auto page_end = Common::DivCeil(addr + size, Core::Memory::PAGE_SIZE); 19 const auto page_end = Common::DivCeil(addr + size, Core::Memory::PAGE_SIZE);
20 for (auto page = addr >> Core::Memory::PAGE_BITS; page != page_end; ++page) { 20 for (auto page = addr >> Core::Memory::PAGE_BITS; page != page_end; ++page) {
21 auto& count = cached_pages.at(page >> 3).Count(page); 21 auto& count = cached_pages.at(page >> 2).Count(page);
22 22
23 if (delta > 0) { 23 if (delta > 0) {
24 ASSERT_MSG(count < UINT8_MAX, "Count may overflow!"); 24 ASSERT_MSG(count < UINT16_MAX, "Count may overflow!");
25 } else if (delta < 0) { 25 } else if (delta < 0) {
26 ASSERT_MSG(count > 0, "Count may underflow!"); 26 ASSERT_MSG(count > 0, "Count may underflow!");
27 } else { 27 } else {
@@ -29,7 +29,7 @@ void RasterizerAccelerated::UpdatePagesCachedCount(VAddr addr, u64 size, int del
29 } 29 }
30 30
31 // Adds or subtracts 1, as count is a unsigned 8-bit value 31 // Adds or subtracts 1, as count is a unsigned 8-bit value
32 count += static_cast<u8>(delta); 32 count += static_cast<u16>(delta);
33 33
34 // Assume delta is either -1 or 1 34 // Assume delta is either -1 or 1
35 if (count == 0) { 35 if (count == 0) {
diff --git a/src/video_core/rasterizer_accelerated.h b/src/video_core/rasterizer_accelerated.h
index 9227a4adc..ea879bfdd 100644
--- a/src/video_core/rasterizer_accelerated.h
+++ b/src/video_core/rasterizer_accelerated.h
@@ -29,20 +29,20 @@ private:
29 public: 29 public:
30 CacheEntry() = default; 30 CacheEntry() = default;
31 31
32 std::atomic_uint8_t& Count(std::size_t page) { 32 std::atomic_uint16_t& Count(std::size_t page) {
33 return values[page & 7]; 33 return values[page & 3];
34 } 34 }
35 35
36 const std::atomic_uint8_t& Count(std::size_t page) const { 36 const std::atomic_uint16_t& Count(std::size_t page) const {
37 return values[page & 7]; 37 return values[page & 3];
38 } 38 }
39 39
40 private: 40 private:
41 std::array<std::atomic_uint8_t, 8> values{}; 41 std::array<std::atomic_uint16_t, 4> values{};
42 }; 42 };
43 static_assert(sizeof(CacheEntry) == 8, "CacheEntry should be 8 bytes!"); 43 static_assert(sizeof(CacheEntry) == 8, "CacheEntry should be 8 bytes!");
44 44
45 std::array<CacheEntry, 0x800000> cached_pages; 45 std::array<CacheEntry, 0x1000000> cached_pages;
46 Core::Memory::Memory& cpu_memory; 46 Core::Memory::Memory& cpu_memory;
47}; 47};
48 48