Commit 6f4ab19
committed
Fix logic that determines whether to spoof GetModuleFileNameW(nullptr)
It was depending on figuring out where it was called from, but the logic was unreliable and there is no apparent way to fix it. Now, it switches spoofing on just before loading SkyrimSE.exe (so the loaded DLLs see the path they expect).
Requires a companion fix in TIltedCore:TiltedPhoques::GetPath() to persist the value found originally, so it doesn't change out from under with late callers. If you code has only late callers, just add a call before loading your game binary.1 parent 806fa93 commit 6f4ab19
File tree
4 files changed
+16
-51
lines changed- Code/immersive_launcher
- stubs
4 files changed
+16
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
| 134 | + | |
129 | 135 | | |
130 | 136 | | |
131 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | 159 | | |
190 | 160 | | |
191 | 161 | | |
192 | 162 | | |
193 | 163 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 164 | + | |
199 | 165 | | |
200 | 166 | | |
201 | 167 | | |
202 | 168 | | |
203 | 169 | | |
204 | 170 | | |
205 | 171 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | 172 | | |
210 | 173 | | |
211 | 174 | | |
| |||
228 | 191 | | |
229 | 192 | | |
230 | 193 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | 194 | | |
241 | 195 | | |
242 | 196 | | |
| |||
246 | 200 | | |
247 | 201 | | |
248 | 202 | | |
249 | | - | |
250 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
251 | 206 | | |
252 | 207 | | |
253 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments