Skip to content

Commit

Permalink
[CKPE]
Browse files Browse the repository at this point in the history
SF:
- Remove `/` or `\` in plugin name (titlebar)
  • Loading branch information
Perchik71 committed Jan 25, 2025
1 parent 4deea1e commit bbfebfd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ namespace CreationKitPlatformExtended
{
namespace Patches
{
#ifdef _CKPE_WITH_QT5
static QString& QFixAppend_PluginName(QString& This, QString* PluginName)
{
if (((*PluginName)[0] == '/') || ((*PluginName)[0] == '\\'))
PluginName->remove(0, 1);
return This.append(PluginName);
}

#endif // !_CKPE_WITH_QT5

RenameCreationKitAppPatch::RenameCreationKitAppPatch() : Module(GlobalEnginePtr)
{}

Expand Down Expand Up @@ -69,15 +79,15 @@ namespace CreationKitPlatformExtended
#ifdef _CKPE_WITH_QT5
if (verPatch == 2)
{
// Initial QCoreApplication
//lpRelocator->PatchString(_RELDATA_RAV(5), "Creation Kit");
// In Qt, it would be necessary to give the name of the window initially, for something acceptable
lpRelocator->Patch(_RELDATA_RAV(1), (uint8_t*)"Creation Kit\0", 13);
// Cut a useless entry [Branch: <some>, Version: <CKVer>]
//lpRelocator->PatchNop(_RELDATA_RAV(2), 0xA7);
lpRelocator->PatchNop(_RELDATA_RAV(4), 0x6);
// Cut a useless entry [Admin]
lpRelocator->DetourCall(_RELDATA_RAV(3), &QString::sprintf);
// Fix splash
lpRelocator->DetourCall(_RELDATA_RAV(5), (uintptr_t)&QFixAppend_PluginName);
}
#endif // !_CKPE_WITH_QT5

Expand Down
Binary file modified Creation Kit Platform Extended Core/Version/build_version.txt
Binary file not shown.
Binary file modified Creation Kit Platform Extended Core/Version/resource_version2.h
Binary file not shown.
2 changes: 1 addition & 1 deletion Database/SF/1_14_74_0/RenameCreationKitApp.relb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ BBEC9A0 0 <nope>
199047B 0 <nope>
1990416 0 <nope>
1990468 0 <nope>
0 0 <nope>
19904A0 0 <nope>

0 comments on commit bbfebfd

Please sign in to comment.