Skip to content

Commit

Permalink
Add further compatibility with Elden Ring Mod Loader by techiew.
Browse files Browse the repository at this point in the history
  • Loading branch information
iArtorias committed Mar 19, 2022
1 parent 74f3556 commit 2cb8155
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ⚔️⏸️ **EldenPause** _v1.1.1_
# ⚔️⏸️ **EldenPause** _v1.1.2_
[![GitHub All Releases](https://img.shields.io/github/downloads/iArtorias/elden_pause/total.svg)](https://github.com/iArtorias/elden_pause/releases)

### A useful mod for Elden Ring allowing you to pause the game any time you want.
Expand All @@ -7,10 +7,11 @@

1. Download the [latest release](https://github.com/iArtorias/elden_pause/releases/latest)
2. Copy the `dinput8.dll` and `elden_pause.ini` to your Elden Ring game folder
3. Launch the game with EAC disabled
* If you're using [Elden Ring Mod Loader](https://www.nexusmods.com/eldenring/mods/117) by [techiew](https://github.com/techiew/EldenRingModLoader), copy `dinput8.dll` and `elden_pause.ini` to the `mods` directory and rename the library to something like `elden_pause.dll`
4. Launch the game with EAC disabled
* To do this, create the file `steam_appid.txt` with the text `1245620` in your game folder and run `eldenring.exe` directly
4. Press `P` button to pause the game. Press the same button again to resume the game.
5. If you're using controller, press `Start` button
5. Press `P` button to pause the game. Press the same button again to resume the game.
6. If you're using controller, press `Start` button

## Remapping the keys

Expand Down
14 changes: 9 additions & 5 deletions elden_pause/include/stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class CProxyStub
const char* m_OldProxyDll{ "version.dll" };
const char* m_ProxyDll{ "dinput8.dll" };

// A full path to the proxy library
fs::path m_proxyPath{};

public:

/// <summary>
Expand All @@ -54,10 +57,11 @@ class CProxyStub
return instance;
}


// A full path to the proxy library
fs::path m_proxy_path{};

// Get the current loaded proxy path
fs::path get_proxy_path() const
{
return m_proxyPath;
}

// Resolve typedefs
__typedef_func( DirectInput8Create, HRESULT, HINSTANCE, DWORD, const IID* const, LPVOID*, LPUNKNOWN );
Expand All @@ -79,7 +83,7 @@ class CProxyStub

wchar_t proxy_path[4096]{};
GetModuleFileNameW( mod, proxy_path, (sizeof( proxy_path )) );
m_proxy_path = fs::path( proxy_path ).parent_path();
m_proxyPath = fs::path( proxy_path ).parent_path();

wchar_t sys_path[MAX_PATH]{};
GetSystemDirectoryW( sys_path, MAX_PATH );
Expand Down
2 changes: 1 addition & 1 deletion elden_pause/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ BOOL APIENTRY DllMain( HMODULE hModule,
auto const size = section->Misc.VirtualSize;

// Read the data from configuration file
read_config( "elden_pause.ini" );
read_config( CProxyStub::instance().get_proxy_path() / "elden_pause.ini" );

/*
je eldenring.XXXXXXXXXXXX
Expand Down

0 comments on commit 2cb8155

Please sign in to comment.