mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-20 14:01:44 +12:00
Merge pull request #1 from wheremyfoodat/master
Not Ignoring this PR I fucked up something on my Github GUI
This commit is contained in:
commit
0f66527cbe
14 changed files with 147 additions and 72 deletions
|
@ -30,24 +30,31 @@ using s32 = std::int32_t;
|
|||
using s64 = std::int64_t;
|
||||
|
||||
namespace Helpers {
|
||||
[[noreturn]] static void panic(const char* fmt, ...) {
|
||||
std::va_list args;
|
||||
va_start(args, fmt);
|
||||
// Unconditional panic, unlike panicDev which does not panic on user builds
|
||||
template <class... Args>
|
||||
[[noreturn]] static void panic(const char* fmt, Args&&... args) {
|
||||
std::cout << termcolor::on_red << "[FATAL] ";
|
||||
std::vprintf(fmt, args);
|
||||
std::printf(fmt, args...);
|
||||
std::cout << termcolor::reset << "\n";
|
||||
va_end(args);
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef PANDA3DS_LIMITED_PANICS
|
||||
template <class... Args>
|
||||
static void panicDev(const char* fmt, Args&&... args) {}
|
||||
#else
|
||||
template <class... Args>
|
||||
[[noreturn]] static void panicDev(const char* fmt, Args&&... args) {
|
||||
panic(fmt, args...);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void warn(const char* fmt, ...) {
|
||||
std::va_list args;
|
||||
va_start(args, fmt);
|
||||
template <class... Args>
|
||||
static void warn(const char* fmt, Args&&... args) {
|
||||
std::cout << termcolor::on_red << "[Warning] ";
|
||||
std::vprintf(fmt, args);
|
||||
std::printf(fmt, args...);
|
||||
std::cout << termcolor::reset << "\n";
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
static constexpr bool buildingInDebugMode() {
|
||||
|
@ -57,6 +64,13 @@ namespace Helpers {
|
|||
return true;
|
||||
}
|
||||
|
||||
static constexpr bool isUserBuild() {
|
||||
#ifdef PANDA3DS_USER_BUILD
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
static void debug_printf(const char* fmt, ...) {
|
||||
if constexpr (buildingInDebugMode()) {
|
||||
std::va_list args;
|
||||
|
|
|
@ -63,6 +63,8 @@ class HIDService {
|
|||
MAKE_LOG_FUNCTION(log, hidLogger)
|
||||
|
||||
// Service commands
|
||||
void disableAccelerometer(u32 messagePointer);
|
||||
void disableGyroscopeLow(u32 messagePointer);
|
||||
void enableAccelerometer(u32 messagePointer);
|
||||
void enableGyroscopeLow(u32 messagePointer);
|
||||
void getGyroscopeLowCalibrateParam(u32 messagePointer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue