mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-26 17:36:05 -05:00
Compare commits
4 commits
948e0d453d
...
e363a3e44c
Author | SHA1 | Date | |
---|---|---|---|
|
e363a3e44c | ||
|
e47d5ff9f4 | ||
|
2ed18863a7 | ||
|
480b12e86c |
7 changed files with 51 additions and 13 deletions
|
@ -1,5 +1,10 @@
|
|||
# Geode Changelog
|
||||
|
||||
## v3.9.3
|
||||
* Add cutoff constructor for CCRenderTexture (#1171)
|
||||
* Add XInputSetState export in proxy loader, fixing certain steam emus (480b12)
|
||||
* Force update to 4.0.1 on forward compat (2ed1886)
|
||||
|
||||
## v3.9.2
|
||||
* Fix searching for mods returning unavailable mods (#1149)
|
||||
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
3.9.2
|
||||
3.9.3
|
||||
|
|
|
@ -61,6 +61,8 @@ class CC_DLL CCRenderTexture : public CCNode
|
|||
*/
|
||||
CC_PROPERTY(CCSprite*, m_pSprite, Sprite)
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCRenderTexture, CCNode)
|
||||
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
struct XINPUT_STATE;
|
||||
struct XINPUT_CAPABILITIES;
|
||||
struct XINPUT_VIBRATION;
|
||||
|
||||
constexpr static auto MAX_PATH_CHARS = 32768u;
|
||||
|
||||
|
@ -41,6 +42,17 @@ extern "C" DWORD XInputGetState(DWORD dwUserIndex, XINPUT_STATE *pState) {
|
|||
return ERROR_DEVICE_NOT_CONNECTED;
|
||||
}
|
||||
|
||||
#pragma comment(linker, "/export:XInputSetState,@3")
|
||||
extern "C" DWORD XInputSetState(DWORD dwUserIndex, XINPUT_VIBRATION* pVibration) {
|
||||
static auto fp = getFP("XInputSetState");
|
||||
if (fp) {
|
||||
using FPType = decltype(&XInputSetState);
|
||||
return reinterpret_cast<FPType>(fp)(dwUserIndex, pVibration);
|
||||
}
|
||||
|
||||
return ERROR_DEVICE_NOT_CONNECTED;
|
||||
}
|
||||
|
||||
#pragma comment(linker, "/export:XInputGetCapabilities,@4")
|
||||
extern "C" DWORD XInputGetCapabilities(DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES *pCapabilities) {
|
||||
static auto fp = getFP("XInputGetCapabilities");
|
||||
|
|
|
@ -68,14 +68,15 @@ void tryShowForwardCompat() {
|
|||
LoaderImpl::get()->getGameVersion())
|
||||
return;
|
||||
|
||||
// TODO: change text later
|
||||
console::messageBox(
|
||||
"Forward Compatibility Warning",
|
||||
"Geode is running in a newer version of GD than Geode targets.\n"
|
||||
"UI is going to be disabled, platform console is forced on and crashes can be more common.\n"
|
||||
"However, if your game crashes, it is probably caused by an outdated mod and not Geode itself.",
|
||||
Severity::Warning
|
||||
);
|
||||
/*Loader::get()->queueInMainThread([]{
|
||||
console::messageBox(
|
||||
"Forward Compatibility Warning",
|
||||
"This version of Geode is for an older version of GD.\n"
|
||||
"Please wait a few minutes for Geode to update\n"
|
||||
"and then restart the game.",
|
||||
Severity::Warning
|
||||
);
|
||||
});*/
|
||||
|
||||
Mod::get()->setSavedValue<std::string>(
|
||||
"last-forward-compat-warn-popup-ver",
|
||||
|
|
|
@ -52,6 +52,11 @@ void updater::fetchLatestGithubRelease(
|
|||
return then(s_latestGithubRelease.value());
|
||||
}
|
||||
|
||||
//quick hack to make sure it always attempts an update check in forward compat
|
||||
if(Loader::get()->isForwardCompatMode()) {
|
||||
force = true;
|
||||
}
|
||||
|
||||
auto version = VersionInfo::parse(
|
||||
Mod::get()->getSavedValue("latest-version-auto-update-check", std::string("0.0.0"))
|
||||
);
|
||||
|
@ -68,9 +73,14 @@ void updater::fetchLatestGithubRelease(
|
|||
auto req = web::WebRequest();
|
||||
req.header("If-Modified-Since", modifiedSince);
|
||||
req.userAgent("github_api/1.0");
|
||||
//Force fetching v4.0.1 as the latest release for forward compat mode
|
||||
RUNNING_REQUESTS.emplace(
|
||||
"@loaderAutoUpdateCheck",
|
||||
req.get("https://api.github.com/repos/geode-sdk/geode/releases/latest").map(
|
||||
req.get(
|
||||
Loader::get()->isForwardCompatMode()
|
||||
? "https://api.github.com/repos/geode-sdk/geode/releases/tags/v4.0.1"
|
||||
: "https://api.github.com/repos/geode-sdk/geode/releases/latest"
|
||||
).map(
|
||||
[expect = std::move(expect), then = std::move(then)](web::WebResponse* response) {
|
||||
if (response->ok()) {
|
||||
if (response->data().empty()) {
|
||||
|
@ -318,6 +328,10 @@ void updater::downloadLoaderUpdate(std::string const& url) {
|
|||
if (ok) {
|
||||
s_isNewUpdateDownloaded = true;
|
||||
LoaderUpdateEvent(UpdateFinished()).post();
|
||||
if(
|
||||
Loader::get()->isForwardCompatMode()
|
||||
&& CCScene::get()->getChildByType<MenuLayer>(0)
|
||||
) utils::game::restart();
|
||||
}
|
||||
else {
|
||||
LoaderUpdateEvent(
|
||||
|
@ -382,8 +396,8 @@ void updater::checkForLoaderUpdates() {
|
|||
return;
|
||||
}
|
||||
|
||||
// don't auto-update major versions
|
||||
if (ver.getMajor() > Loader::get()->getVersion().getMajor()) {
|
||||
// don't auto-update major versions when not on forward compat
|
||||
if (!Loader::get()->isForwardCompatMode() && ver.getMajor() > Loader::get()->getVersion().getMajor()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -218,5 +218,9 @@ void console::messageBox(char const* title, std::string const& info, Severity se
|
|||
icon = MB_ICONERROR;
|
||||
break;
|
||||
}
|
||||
MessageBoxA(nullptr, info.c_str(), title, icon);
|
||||
|
||||
//run in another thread so auto update can run in the background
|
||||
std::thread([info, title, icon]{
|
||||
MessageBoxA(nullptr, info.c_str(), title, icon | MB_SETFOREGROUND);
|
||||
}).detach();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue