citra-emu
/
citra-canary
Archived
1
0
Fork 0

Merge pull request #4786 from FearlessTobi/port-minor

Port yuzu-emu/yuzu#2528 and yuzu-emu/yuzu#2530: Minor changes
This commit is contained in:
Pengfei Zhu 2019-06-05 22:38:28 +08:00 committed by GitHub
commit 49f6f11462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -41,4 +41,7 @@ struct Rectangle {
}
};
template <typename T>
Rectangle(T, T, T, T)->Rectangle<T>;
} // namespace Common

View File

@ -143,9 +143,9 @@ std::shared_ptr<SDLJoystick> SDLState::GetSDLJoystickByGUID(const std::string& g
std::lock_guard lock{joystick_map_mutex};
const auto it = joystick_map.find(guid);
if (it != joystick_map.end()) {
while (it->second.size() <= port) {
auto joystick = std::make_shared<SDLJoystick>(guid, it->second.size(), nullptr,
[](SDL_Joystick*) {});
while (it->second.size() <= static_cast<std::size_t>(port)) {
auto joystick = std::make_shared<SDLJoystick>(guid, static_cast<int>(it->second.size()),
nullptr, [](SDL_Joystick*) {});
it->second.emplace_back(std::move(joystick));
}
return it->second[port];