mirror of https://github.com/zeldaret/botw.git
AutoDim decompiled
This commit is contained in:
parent
24cc84add7
commit
d12508cfce
|
@ -88649,11 +88649,11 @@
|
||||||
0x00000071010b6558,sub_71010B6558,24,
|
0x00000071010b6558,sub_71010B6558,24,
|
||||||
0x00000071010b6570,sub_71010B6570,200,
|
0x00000071010b6570,sub_71010B6570,200,
|
||||||
0x00000071010b6638,sub_71010B6638,376,
|
0x00000071010b6638,sub_71010B6638,376,
|
||||||
0x00000071010b67b0,sub_71010B67B0,96,
|
0x00000071010b67b0,sub_71010B67B0,96,_ZN4ksys7AutoDim18SingletonDisposer_D1Ev
|
||||||
0x00000071010b6810,sub_71010B6810,104,
|
0x00000071010b6810,sub_71010B6810,104,_ZN4ksys7AutoDim18SingletonDisposer_D0Ev
|
||||||
0x00000071010b6878,AutoDim::createInstance,136,
|
0x00000071010b6878,AutoDim::createInstance,136,_ZN4ksys7AutoDim14createInstanceEPN4sead4HeapE
|
||||||
0x00000071010b6900,AutoDim::__auto1,84,
|
0x00000071010b6900,AutoDim::__auto1,84,_ZN4ksys7AutoDim10setEnabledEb
|
||||||
0x00000071010b6954,AutoDim::__auto0,8,
|
0x00000071010b6954,AutoDim::__auto0,8,_ZNK4ksys7AutoDim9isEnabledEv
|
||||||
0x00000071010b695c,sub_71010B695C,384,
|
0x00000071010b695c,sub_71010B695C,384,
|
||||||
0x00000071010b6adc,sub_71010B6ADC,68,
|
0x00000071010b6adc,sub_71010B6ADC,68,
|
||||||
0x00000071010b6b20,sub_71010B6B20,64,
|
0x00000071010b6b20,sub_71010B6B20,64,
|
||||||
|
|
Can't render this file because it is too large.
|
|
@ -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
|
target_sources(uking PRIVATE
|
||||||
Account.cpp
|
Account.cpp
|
||||||
Account.h
|
Account.h
|
||||||
|
AutoDim.cpp
|
||||||
|
AutoDim.h
|
||||||
BasicProfiler.cpp
|
BasicProfiler.cpp
|
||||||
BasicProfiler.h
|
BasicProfiler.h
|
||||||
CameraEditor.cpp
|
CameraEditor.cpp
|
||||||
|
|
Loading…
Reference in New Issue