mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-24 05:14:40 -04:00
fix GEODE_PRETTY_FUNCTION on clang
This commit is contained in:
parent
1b40d1a6da
commit
7370f78a6d
4 changed files with 49 additions and 44 deletions
codegen/src
loader
|
@ -33,9 +33,9 @@ public:
|
|||
[[deprecated("Use of undefined virtual function - will crash at runtime!!!")]]
|
||||
{virtual}{return_type} {function_name}({parameters}){const}{{
|
||||
#ifdef GEODE_NO_UNDEFINED_VIRTUALS
|
||||
static_assert(false, "Undefined virtual function " GEODE_PRETTY_FUNCTION " - implement in GeometryDash.bro");
|
||||
static_assert(false, "Undefined virtual function - implement in GeometryDash.bro");
|
||||
#endif
|
||||
throw std::runtime_error("Use of undefined virtual function " GEODE_PRETTY_FUNCTION);
|
||||
throw std::runtime_error("Use of undefined virtual function " + GEODE_PRETTY_FUNCTION);
|
||||
}}
|
||||
)GEN";
|
||||
|
||||
|
|
|
@ -64,9 +64,9 @@ namespace std {
|
|||
}
|
||||
|
||||
#if !defined(__PRETTY_FUNCTION__) && !defined(__GNUC__)
|
||||
#define GEODE_PRETTY_FUNCTION __FUNCSIG__
|
||||
#define GEODE_PRETTY_FUNCTION std::string_view(__FUNCSIG__)
|
||||
#else
|
||||
#define GEODE_PRETTY_FUNCTION __PRETTY_FUNCTION__
|
||||
#define GEODE_PRETTY_FUNCTION std::string_view(__PRETTY_FUNCTION__)
|
||||
#endif
|
||||
|
||||
// Windows
|
||||
|
|
|
@ -59,6 +59,12 @@
|
|||
"default": true,
|
||||
"name": "Check For Updates",
|
||||
"description": "Automatically check for <cy>updates</c> to Geode on startup"
|
||||
},
|
||||
"auto-update-mods": {
|
||||
"type": "bool",
|
||||
"default": true,
|
||||
"name": "Auto-Update Mods",
|
||||
"description": "Automatically update <cp>mods</c> on startup"
|
||||
}
|
||||
},
|
||||
"issues": {
|
||||
|
|
|
@ -86,46 +86,45 @@ static void updateIndexProgress(
|
|||
g_indexUpdateNotif->hide();
|
||||
g_indexUpdateNotif = nullptr;
|
||||
if (Index::get()->areUpdatesAvailable()) {
|
||||
// todo: uncomment and fix crash
|
||||
// if (Mod::get()->getDataStore()["enable-auto-updates"]) {
|
||||
// auto ticket = Index::get()->installUpdates(updateModsProgress);
|
||||
// if (!ticket) {
|
||||
// NotificationBuilder()
|
||||
// .title("Unable to auto-update")
|
||||
// .text("Unable to update mods :(")
|
||||
// .icon("updates-failed.png"_spr)
|
||||
// .show();
|
||||
// } else {
|
||||
// g_indexUpdateNotif = NotificationBuilder()
|
||||
// .title("Installing updates")
|
||||
// .text("Installing updates...")
|
||||
// .clicked([ticket](auto) -> void {
|
||||
// createQuickPopup(
|
||||
// "Cancel Updates",
|
||||
// "Do you want to <cr>cancel</c> updates?",
|
||||
// "Don't Cancel", "Cancel Updates",
|
||||
// [ticket](auto, bool btn2) -> void {
|
||||
// if (g_indexUpdateNotif && btn2) {
|
||||
// ticket.value()->cancel();
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
// }, false)
|
||||
// .loading()
|
||||
// .stay()
|
||||
// .show();
|
||||
// }
|
||||
// } else {
|
||||
// NotificationBuilder()
|
||||
// .title("Updates available")
|
||||
// .text("Some mods have updates available!")
|
||||
// .icon("updates-available.png"_spr)
|
||||
// .clicked([](auto) -> void {
|
||||
// ModListLayer::scene();
|
||||
// })
|
||||
// .show();
|
||||
// }
|
||||
// addUpdateIcon();
|
||||
if (Mod::get()->getSettingValue<bool>("auto-update-mods")) {
|
||||
auto ticket = Index::get()->installUpdates(updateModsProgress);
|
||||
if (!ticket) {
|
||||
NotificationBuilder()
|
||||
.title("Unable to auto-update")
|
||||
.text("Unable to update mods :(")
|
||||
.icon("updates-failed.png"_spr)
|
||||
.show();
|
||||
} else {
|
||||
g_indexUpdateNotif = NotificationBuilder()
|
||||
.title("Installing updates")
|
||||
.text("Installing updates...")
|
||||
.clicked([ticket](auto) -> void {
|
||||
createQuickPopup(
|
||||
"Cancel Updates",
|
||||
"Do you want to <cr>cancel</c> updates?",
|
||||
"Don't Cancel", "Cancel Updates",
|
||||
[ticket](auto, bool btn2) -> void {
|
||||
if (g_indexUpdateNotif && btn2) {
|
||||
ticket.value()->cancel();
|
||||
}
|
||||
}
|
||||
);
|
||||
}, false)
|
||||
.loading()
|
||||
.stay()
|
||||
.show();
|
||||
}
|
||||
} else {
|
||||
NotificationBuilder()
|
||||
.title("Updates available")
|
||||
.text("Some mods have updates available!")
|
||||
.icon("updates-available.png"_spr)
|
||||
.clicked([](auto) -> void {
|
||||
ModListLayer::scene();
|
||||
})
|
||||
.show();
|
||||
}
|
||||
addUpdateIcon();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue