mirror of
https://github.com/zeldaret/botw
synced 2026-06-12 21:44:50 -04:00
AutoDim decompiled
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#include "KingSystem/System/AutoDim.h"
|
||||
#include <nn/oe.h>
|
||||
#include <prim/seadScopedLock.h>
|
||||
|
||||
namespace ksys {
|
||||
|
||||
SEAD_SINGLETON_DISPOSER_IMPL(AutoDim)
|
||||
|
||||
void AutoDim::setEnabled(bool enable) {
|
||||
const auto lock = sead::makeScopedLock(mCS);
|
||||
mEnabled = enable;
|
||||
if (enable)
|
||||
nn::oe::SetUserInactivityDetectionTimeExtended(false);
|
||||
else
|
||||
nn::oe::SetUserInactivityDetectionTimeExtended(true);
|
||||
}
|
||||
|
||||
bool AutoDim::isEnabled() const {
|
||||
return mEnabled;
|
||||
}
|
||||
|
||||
} // namespace ksys
|
||||
@@ -0,0 +1,19 @@
|
||||
#include <heap/seadDisposer.h>
|
||||
#include <thread/seadCriticalSection.h>
|
||||
|
||||
namespace ksys {
|
||||
|
||||
class AutoDim {
|
||||
SEAD_SINGLETON_DISPOSER(AutoDim)
|
||||
AutoDim() = default;
|
||||
|
||||
public:
|
||||
void setEnabled(bool enable);
|
||||
bool isEnabled() const;
|
||||
|
||||
private:
|
||||
bool mEnabled = true;
|
||||
sead::CriticalSection mCS{};
|
||||
};
|
||||
|
||||
} // namespace ksys
|
||||
@@ -1,6 +1,8 @@
|
||||
target_sources(uking PRIVATE
|
||||
Account.cpp
|
||||
Account.h
|
||||
AutoDim.cpp
|
||||
AutoDim.h
|
||||
BasicProfiler.cpp
|
||||
BasicProfiler.h
|
||||
CameraEditor.cpp
|
||||
|
||||
Reference in New Issue
Block a user