mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-18 01:11:19 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ba504b19c |
@@ -24,7 +24,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (lz4_FOUND AND NOT TARGET lz4::lz4)
|
if (lz4_FOUND AND NOT TARGET lz4::lz4)
|
||||||
if (TARGET LZ4::lz4_shared AND NOT YUZU_STATIC_BUILD)
|
if (TARGET LZ4::lz4_shared)
|
||||||
add_library(lz4::lz4 ALIAS LZ4::lz4_shared)
|
add_library(lz4::lz4 ALIAS LZ4::lz4_shared)
|
||||||
elseif (TARGET LZ4::lz4_static)
|
elseif (TARGET LZ4::lz4_static)
|
||||||
add_library(lz4::lz4 ALIAS LZ4::lz4_static)
|
add_library(lz4::lz4 ALIAS LZ4::lz4_static)
|
||||||
|
|||||||
@@ -83,20 +83,21 @@ void Joycons::ScanThread(std::stop_token stop_token) {
|
|||||||
constexpr u16 nintendo_vendor_id = 0x057e;
|
constexpr u16 nintendo_vendor_id = 0x057e;
|
||||||
Common::SetCurrentThreadName("JoyconScanThread");
|
Common::SetCurrentThreadName("JoyconScanThread");
|
||||||
|
|
||||||
|
auto last_ret = 0u;
|
||||||
do {
|
do {
|
||||||
|
auto ret = SDL_hid_device_change_count();
|
||||||
|
if (last_ret == 0u || last_ret != ret) {
|
||||||
|
last_ret = ret;
|
||||||
SDL_hid_device_info* devs = SDL_hid_enumerate(nintendo_vendor_id, 0x0);
|
SDL_hid_device_info* devs = SDL_hid_enumerate(nintendo_vendor_id, 0x0);
|
||||||
SDL_hid_device_info* cur_dev = devs;
|
for (auto* cur_dev = devs; cur_dev; cur_dev = cur_dev->next) {
|
||||||
|
|
||||||
while (cur_dev) {
|
|
||||||
if (IsDeviceNew(cur_dev)) {
|
if (IsDeviceNew(cur_dev)) {
|
||||||
LOG_DEBUG(Input, "Device Found,type : {:04X} {:04X}", cur_dev->vendor_id,
|
LOG_DEBUG(Input, "Device Found,type : {:04X} {:04X}", cur_dev->vendor_id, cur_dev->product_id);
|
||||||
cur_dev->product_id);
|
|
||||||
RegisterNewDevice(cur_dev);
|
RegisterNewDevice(cur_dev);
|
||||||
}
|
}
|
||||||
cur_dev = cur_dev->next;
|
cur_dev = cur_dev->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_hid_free_enumeration(devs);
|
SDL_hid_free_enumeration(devs);
|
||||||
|
}
|
||||||
} while (Common::StoppableTimedWait(stop_token, std::chrono::seconds{5}));
|
} while (Common::StoppableTimedWait(stop_token, std::chrono::seconds{5}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,12 @@ VkViewport GetViewportState(const Device& device, const Maxwell& regs, size_t in
|
|||||||
|
|
||||||
if (lower_left) {
|
if (lower_left) {
|
||||||
// Flip by surface clip height
|
// Flip by surface clip height
|
||||||
y += conv(static_cast<f32>(regs.surface_clip.height));
|
const float clip_height = conv(static_cast<f32>(regs.surface_clip.height));
|
||||||
|
if (src.scale_y < 0.0f && y >= clip_height) {
|
||||||
|
y = clip_height - y;
|
||||||
|
} else {
|
||||||
|
y += clip_height;
|
||||||
|
}
|
||||||
height = -height;
|
height = -height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user