summaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2017-02-24 20:48:31 -0800
committerGravatar GitHub2017-02-24 20:48:31 -0800
commitfb5301cf6e7fd5d9ff2ea28b0ee610a7861146e6 (patch)
treef913ca09229ad69b2a7af02fc7564481b316cf70 /src/core/hle/svc.cpp
parentFixes file upload pattern in the travis.yml to include macOS releases (#2592) (diff)
parentTimers: Return an error when calling SetTimer with negative timeouts. (diff)
downloadyuzu-fb5301cf6e7fd5d9ff2ea28b0ee610a7861146e6.tar.gz
yuzu-fb5301cf6e7fd5d9ff2ea28b0ee610a7861146e6.tar.xz
yuzu-fb5301cf6e7fd5d9ff2ea28b0ee610a7861146e6.zip
Merge pull request #2421 from Subv/timers
Timers: Immediately signal the timer if it was started with an initial value of 0
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 96db39ad9..1baa80671 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -837,6 +837,11 @@ static ResultCode SetTimer(Kernel::Handle handle, s64 initial, s64 interval) {
837 837
838 LOG_TRACE(Kernel_SVC, "called timer=0x%08X", handle); 838 LOG_TRACE(Kernel_SVC, "called timer=0x%08X", handle);
839 839
840 if (initial < 0 || interval < 0) {
841 return ResultCode(ErrorDescription::OutOfRange, ErrorModule::Kernel,
842 ErrorSummary::InvalidArgument, ErrorLevel::Permanent);
843 }
844
840 SharedPtr<Timer> timer = Kernel::g_handle_table.Get<Timer>(handle); 845 SharedPtr<Timer> timer = Kernel::g_handle_table.Get<Timer>(handle);
841 if (timer == nullptr) 846 if (timer == nullptr)
842 return ERR_INVALID_HANDLE; 847 return ERR_INVALID_HANDLE;