Commit Graph

244 Commits

Author SHA1 Message Date
otavepto
4fb6dcb3fa + learned the lesson, lock the global mutex in different other places just to be on the safe side, after lego 2k I am hesitent about all APIs, will this slow things down?
+ refactor some debug messages
2023-12-20 05:32:17 +02:00
a
5f004ab471 (RIN forum) added updated translations for Russian to the overlay by GogoVan from https://cs.rin.ru/forum/viewtopic.php?p=2939565#p2939565 2023-12-14 04:49:52 +02:00
a
e7a277678b (RIN forum) added updated translations for Spanish + Latin American to the overlay by dragonslayer609 from https://cs.rin.ru/forum/viewtopic.php?p=2936892#p2936892 2023-12-14 04:49:49 +02:00
a
439ffa5237 (RIN forum) added cvsR4U1 by ce20fdf2 from https://cs.rin.ru/forum/viewtopic.php?p=2936697#p2936697 2023-12-14 04:49:15 +02:00
a
62a92e5bf6 (RIN forum) added new release 4 by ce20fdf2 from https://cs.rin.ru/forum/viewtopic.php?p=2933673#p2933673 2023-12-14 04:45:59 +02:00
a
4399c0b12b (RIN forum) added hotfix 2 by ce20fdf2: https://cs.rin.ru/forum/viewtopic.php?p=2884110#p2884110
* + avoid unnecessary locks in experimental overlay if the functionality is disabled
2023-12-14 04:44:39 +02:00
a
75e6d7c8ab (RIN forum) add initial hotfix by ce20fdf2
* + revert the change to SetProduct() and SetGameDescription()

* + less verbose return in Steam_GameServer::BSecure()

* + add missing note in ReadMe about libssq
2023-12-14 04:40:25 +02:00
Mr_Goldberg
475342f0d8
SDK 1.56 and 1.57 2023-05-08 22:36:51 -04:00
Mr_Goldberg
b1986dfe38
Overlay chat window improvements. 2022-09-03 04:13:58 -04:00
Mr_Goldberg
c9a102ee30
Use shared font atlas and fix crash when opening overlay in some games. 2022-08-21 03:45:11 -04:00
Mr_Goldberg
de6805dd8b
Update nemirtingas overlay to latest. 2022-08-21 03:43:24 -04:00
Mr_Goldberg
077e532bd2
Fix overlay getting stuck if stopped to quickly after being started. 2022-08-16 12:32:28 -04:00
Mr_Goldberg
276a9902df
Update nemirtingas overlay to latest to fix clipcursor related issue. 2022-08-16 12:29:58 -04:00
Mr_Goldberg
0a80b60b6c
Use windows fonts in overlay if present. 2022-08-13 14:35:59 -04:00
Mr_Goldberg
743a810463
Update nemirtingas overlay. 2022-08-13 14:32:43 -04:00
Mr_Goldberg
04022c005f
Update nemirtingas overlay to latest. 2022-08-10 03:22:23 -04:00
Mr_Goldberg
7c419e0afe
Fix overlay crash in games that load then unload steam api dll. 2022-08-07 23:11:21 -04:00
Mr_Goldberg
eef92f1fe6
Add early version of script to generate emu config.
Only generates achievements and stats configs at the moment.
2022-08-06 05:23:49 -04:00
Mr_Goldberg
ad66573a20
Fix crashes. 2022-08-05 18:45:33 -04:00
Mr_Goldberg
5e880cd974
Add achievements display to overlay and ability to change some settings. 2022-08-05 02:09:43 -04:00
Mr_Goldberg
c17fb0c931
Update Nemirtingas overlay to latest. 2022-08-05 02:06:42 -04:00
Nemirtingas
76c9e7a9ee Fix game crash.
WHen overlay is shown, you have at least 1 friend connected and you resize the game window smaller to the friend list position, it crashes because ImGui::ListBoxHeader returns false when its clipped and ImGui::ListBoxFooter shouldn't be called.
2021-05-09 10:11:35 +02:00
Mr_Goldberg
8a5e49251c
Remove hex symbols in overlay chat window. 2021-04-02 23:40:54 -04:00
Mr_Goldberg
3f06dd8576
Call GameLobbyJoinRequested_t if a lobby exists when joining with rich presence. 2021-03-07 19:04:01 -05:00
Mr_Goldberg
5f8a454e3f
Fixed mouse getting stuck in the middle of the overlay in some games. 2021-02-06 22:38:51 -05:00
Mr_Goldberg
cfff531a23
Put back the if new frame for overlay. 2021-01-23 16:46:44 -05:00
Mr_Goldberg
d6bdde0123
Update ImGui 2021-01-17 22:58:42 -05:00
Nemirtingas
e100c89160 Remove some other headers that are in common_includes.h 2020-07-16 20:25:14 +02:00
Nemirtingas
fe9bbd1104 Add a common include file. 2020-07-16 11:56:24 +02:00
Mr_Goldberg
2c95011e73
Fix mouse cursor showing up in some games due to overlay. 2020-02-14 15:03:20 -05:00
Mr_Goldberg
b4205535fb
Only allow people to join lobbies with the overlay if they have been invited first. 2020-02-02 19:07:30 -05:00
Mr_Goldberg
245d379720
Fix overlay not working in barotrauma. 2020-02-02 19:06:44 -05:00
Mr_Goldberg
39d1d8dcdf
Add a notifications mutex to the overlay. 2020-01-26 17:24:16 -05:00
Mr_Goldberg
eace15df47
Thread related overlay improvements. 2020-01-26 09:46:57 -05:00
Mr_Goldberg
e0af318948
Try to fix overlay related lag. 2020-01-25 15:23:16 -05:00
Mr_Goldberg
43a5b13302
Use different mutex for overlay to try to fix lag. 2020-01-20 11:47:12 -05:00
Nemirtingas
1dc5bcc5c1
Fix hooks not working
Even if dxgi is hooked, it will not be rehooked, HookDXGIPresent has a check, but different dx versions need a call to loadFunctions.
2020-01-20 11:45:04 -05:00
Mr_Goldberg
db2a803cf7
A few improvements to the overlay merge request.
NO_OVERLAY define becomes EMU_OVERLAY which enables the overlay instead of disabling it.

disable_overlay.txt moved to steam_settings.
2020-01-19 12:55:14 -05:00
Nemirtingas
dc3dee9ce8 Added more prebuilt shader
Skyrim deployed its own d3dcompile dll that nullifies shaders compilation, so you either have to load the one in C:\Windows\System32|SysWow64 or use prebuilt.
I use prebuilt
2020-01-11 14:42:00 +01:00
Nemirtingas
0711c83440 Check if we actually created a new frame 2020-01-10 08:10:33 +01:00
Nemirtingas
20c03cda75 Update steam_overlay.cpp 2019-12-10 05:56:08 +00:00
Nemirtingas
4c2484cdef Update Renderer_Detector.cpp
DX12 hook
2019-12-09 11:06:43 +00:00
Nemirtingas
02924d986e Update Renderer_Detector.cpp 2019-12-08 21:20:23 +00:00
Nemirtingas
547cbdbb4e Added barrier to DX12 overlay.
Gears5 seems to have a problem with the overlay. While loading and in the main menu, it works fine, but if you press enter, it crashes saying the GPU is not responding. Can't debug it with CODEX, it checks for a debugger.
Works fine on sniper elite5.
2019-11-08 15:56:30 +01:00
Nemirtingas
695954e13a Add software cursor to Linux overlay too 2019-11-08 15:56:21 +01:00
Nemirtingas
1af7902aae Add dummy funcs. 2019-11-08 15:56:00 +01:00
Nemirtingas
dd1a21dae9 Clean Linux hook, not needed
Linux uses LD_PRELOAD to load the overlay
2019-11-08 15:55:18 +01:00
Nemirtingas
55ba49c957 Clean a bit Linux Overlay 2019-11-08 15:54:48 +01:00
Nemirtingas
1edbdd8a35 Free DX12 devices on destroy 2019-11-08 15:53:08 +01:00
Nemirtingas
cf3dea2bbe Allow ImGui to process events if the overlay is hidden
This is used for the notifications when overlay is off.
2019-11-08 15:52:50 +01:00
Nemirtingas
ce79df1c26 Added customizable notification
Notification can have a type depending on what to show.
2019-11-08 15:52:38 +01:00
Nemirtingas
982ec56007 Enable DX12 overlay 2019-11-08 15:46:57 +01:00
Nemirtingas
c667dbd3af Rework DX12 overlay to use Present to render the overlay 2019-11-08 15:45:52 +01:00
Nemirtingas
c006555b01 Add infos on friend game
Add friend appid and check if the game is compatible.
2019-10-14 16:35:53 +02:00
Nemirtingas
bce574dc43 Changed windows id and fixed chat layout 2019-10-13 12:27:48 +02:00
Nemirtingas
d467248236 Forgot to initialize overlay's close button 2019-10-13 12:27:44 +02:00
Nemirtingas
4d99b6affd Fix race condition
Fix race condition when renderer was found and we were hooking a library func
2019-10-13 12:27:41 +02:00
Nemirtingas
894300b6f4 Process raw mouse events
Some games doesn't use the window proc to get the mouse events (ETS2), but it checks for raw mouse inputs.
2019-10-13 12:27:37 +02:00
Nemirtingas
8abb0c8bc2 Add close button for overlay 2019-10-13 12:27:32 +02:00
Nemirtingas
6c09635600 Added the possibility to create new fonts.
Fonts cannot be created after a NewFrame call.
2019-09-05 09:00:02 +02:00
Nemirtingas
e82579b82c Update steam_overlay.h 2019-09-04 17:40:22 +00:00
Nemirtingas
2db31928e9 Notifications 2019-09-04 19:31:31 +02:00
Nemirtingas
344674b889 revert of "Should fix the cursor until we draw our own cursor." 2019-09-03 19:22:08 +02:00
Nemirtingas
6ebc946607 Fixed overlay now showing on some games
In sanctum2, not writing in our own context makes the game crash.
2019-09-03 17:25:55 +02:00
Nemirtingas
1016e7f47f Fix lag on events
Found on sanctum2, returning 0 in XPending & XEventsQueued make the SDL do something else than polling events and makes lag the event loop.
Now the event loop returns 0 when there are no more events.
2019-09-03 17:25:42 +02:00
Nemirtingas
ecd753422b Updated Linux X11 & OLGX hooks.
Use LD_PRELOAD=$PWD/libsteam_api.so app_name to load overlay.
2019-09-03 11:38:37 +02:00
Nemirtingas
d6f29ffffa Added logs for Linux_Detour 2019-09-03 11:38:28 +02:00
Nemirtingas
5af1d18a8f Fixed overlay thread joining on himself 2019-09-02 10:51:32 +02:00
Nemirtingas
95e87eb832 Clean Linux Detour 2019-09-01 23:21:50 +02:00
Nemirtingas
b9cd9ae6c2 Fix build 2019-09-01 20:53:16 +02:00
Nemirtingas
1785ae6eaf Moved every platform specific code to their own folder 2019-09-01 20:48:27 +02:00
Nemirtingas
549dc7c50e This carries window exit 2019-09-01 20:47:13 +02:00
Nemirtingas
c27ab3993c Linux renderer detection 2019-09-01 20:47:10 +02:00
Nemirtingas
86f94bc337 Linux hooks 2019-09-01 20:47:07 +02:00
Nemirtingas
0573c4eb94 Windows only part 2019-09-01 20:47:00 +02:00
Nemirtingas
495bc957cd Added some os detection
Need to detect linux x86 or x64
2019-09-01 20:46:55 +02:00
Nemirtingas
92ed36f499 Linux version of detour 2019-09-01 20:45:43 +02:00
Nemirtingas
b6eb929383 Should fix the cursor until we draw our own cursor. 2019-08-27 21:15:58 +02:00
Nemirtingas
4f7e42a905 Call the true function before initializing hook. 2019-08-27 19:56:41 +02:00
Nemirtingas
3c265596a9 Removed DX12 until further notice. 2019-08-27 19:21:32 +02:00
Nemirtingas
622c435cb7 Fixed typo in DX12 & reorder hook call.
Should call the Present function before hooking DX cause DX also hook Present even if the hook is disabled by Renderer_Detector before initializing the DX hook.
2019-08-27 17:40:44 +02:00
Nemirtingas
36e8966223 Cleanup again 2019-08-27 16:29:20 +02:00
Nemirtingas
04847abeb7 Overlay & Hook cleanup. 2019-08-27 15:45:53 +02:00
Nemirtingas
44d583ee7d Added class Renderer_Detector.
Hook_Manager now only manages hooks.
Renderer_Detector is used to detect the game's renderer. There will be 2 version of it. 1 for windows and 1 for Linux.
2019-08-27 15:38:07 +02:00
Nemirtingas
ff25f294f0 Fixed typo 2019-08-27 00:16:53 +02:00
Nemirtingas
9b178146c4 Cleaned a bit hooks and added sanity checks. 2019-08-26 19:36:07 +02:00
Nemirtingas
d0251b0b01 Some kind of DX12 hook 2019-08-26 16:46:56 +02:00
Nemirtingas
8e07dd0c6b Changed window detection. 2019-08-26 16:38:21 +02:00
Nemirtingas
dd530e80b1 Now passing to hooks device object.
Added Base_Hook::get_lib_name to track what renderer is hooked for overlay.
Objects used to detect renderer type are now also used to hook the rendering functions. So we don't have to build another device.
Updated VTables for DX12.
2019-08-26 16:38:01 +02:00
Nemirtingas
cd8c5fc2ea Fixed memory leak 2019-08-25 21:22:25 +02:00
Nemirtingas
42a22dd4bb Don't free objects with shutdown
Some games don't like to free the DX objects after the game has shut down.
2019-08-21 21:52:08 +02:00
Nemirtingas
4db2b6528c Changed window detection code.
GetModuleHandle(NULL) get the exe handle. Sometimes the window couldn't be found because the window wasn't created in the .exe but in a dll. Thats why I list all dll HANDLES and try to find the main window handle.
2019-08-21 21:50:59 +02:00
Nemirtingas
0fa2d82c67 Fixed overlay on x64
They are not longer available with GetWindowLong. There is a new function GetWindowLongPtr.
GWLP* must be used.
2019-08-21 10:46:58 +02:00
Nemirtingas
5a0653d080 Refactor dx device creation
Find the game's window instead of using the foreground window.
2019-08-20 23:27:17 +02:00
Nemirtingas
dc7480c633 Better compatibility for dx10 and 11 2019-08-20 08:27:50 +02:00
Nemirtingas
8757f4a548 Fixed ressource leaks. 2019-08-19 19:51:35 +02:00
Nemirtingas
c99628a88a Added hook retry.
Handed hook detection to a thread that can then retry.
With that, don't need to wait for loadLibrary.
Will remove all those commented functions in another version.
2019-08-19 18:57:55 +02:00
Nemirtingas
5893b69d1f Partially working DX12 overlay
DX12 hook seems ok, there are some bugs remaining.
ImGui setup for DX12 doesn't work.
2019-08-19 18:56:15 +02:00
Nemirtingas
3c83e08d34 Fix the last frame before not showing overlay
The last frame was sending inputs to the game window, making the game receive a <TAB>.
2019-08-18 17:49:47 +02:00
Nemirtingas
ca0ef4380a Moved hooks calls and added hook retry
With that change, I no longer re-hook rendering functions as Hook_Manager::FoundRenderer removes all hooks and then we hook the true functions in the renderer specialization.
Added a retry count.
2019-08-18 17:12:57 +02:00
Nemirtingas
5b0306dccc Moved window hooks to its own class
Every class has a job. Overlay is to show an overlay not to hook windows functions.
Hook_Manager's job is to manage hooks and should not contain a reference to the overlay. (It should not contains any reference to directX or OpenGL either but I'll see that later... Maybe)
This makes the overlay code much cleaner and "could" be used in Linux as well.
2019-08-18 16:22:07 +02:00
Nemirtingas
f096a2d8a2 Use LoadLibrary instead of LoadModule
LoadLibrary increase the reference count to the library. So we make sure this library is still loaded when we shut down the hook.
2019-08-18 16:19:28 +02:00
Nemirtingas
fdeb5912d3 Try to Disable all inputs when overlay is on 2019-08-18 14:29:08 +02:00
Nemirtingas
757dc479e4 Removed inline 2019-08-16 19:32:32 +02:00
Nemirtingas
5d4b4371f3 Fixed everything that I've forgot 2019-08-16 19:21:30 +02:00
Nemirtingas
d06fbba104 Added error handling when hook fails 2019-08-16 19:10:12 +02:00
Nemirtingas
1b37e837a1 Notification sound when something happen 2019-08-16 18:31:56 +02:00
Nemirtingas
7b53134512 Initialize overlay after full initialization of UI. 2019-08-16 18:30:55 +02:00
Nemirtingas
05f3fa09b3 Better compatibility for DX10 & DX11
Create a NULL Device (We only need it to retrieve its vtable)
2019-08-16 18:29:49 +02:00
Nemirtingas
2792793bf3 Only call overlay related functions if it is ready
Continue to receive friends notifications, so if the overlay becomes ready we already have the list of friends.
2019-08-16 10:37:45 +02:00
Nemirtingas
40615d07a7 Reworked how renderers are hooked.
Some games doesn't initialise Steam before initalizing their Renderer (even if the doc says to) . So instead of waiting for the game to initialize it, hook to the rendering functions and deduce which implementation should be used.
2019-08-16 10:36:44 +02:00
Nemirtingas
4d3c355fcc Renammed hook_<renderer> to start_hook 2019-08-16 10:31:29 +02:00
Nemirtingas
2fe5e90294 Reworked booleans 2019-08-16 10:28:23 +02:00
Nemirtingas
8abd24ca54 Re-enabled auto join if overlay is not ready 2019-08-16 00:12:11 +02:00
Nemirtingas
3516b98042 Replaced wildcard with sed. 2019-08-15 22:23:59 +02:00
Nemirtingas
6224350142 Fixed compilation for windows 2019-08-14 18:11:00 +02:00
Nemirtingas
d87760b78b Created a define to not compile overlay. 2019-08-14 15:09:57 +02:00
Nemirtingas
3eeca9b50e Modified a bit overlay and added comments 2019-08-14 14:56:57 +02:00
Nemirtingas
2c74abd6ab Moved this docs to the tool's doc 2019-08-14 14:56:27 +02:00
Nemirtingas
56b4e6a7c7 Added preprocessor exclusion for linux 2019-08-14 14:55:31 +02:00
Nemirtingas
86fa3ab47a Comments
Explains what I could use to get steam's info. Its in plain http, could use a simple socket to read the json.
2019-08-12 16:04:14 +02:00
Nemirtingas
9f3e3a95da Cleaned hooks
I don't even know why I thought it was a good idea to hook dispatchMessage.
2019-08-07 11:11:31 +02:00
Nemirtingas
d3ded5842d Added invite/join checks
Don't show "Invite" button if current user doesn't have a lobby.
Don't show "Join" button if friend doesn't have a lobby.
Added a button to open chat with a right click.
Close the popup when you click a button.
2019-08-06 13:46:43 +02:00
Nemirtingas
d2a75db930 Moved colored implementation to their own functions
To minimise source code modifications, colored input text has been moved to their own functions.
The ImFont is still modified tho.
2019-08-03 14:37:03 +02:00
Nemirtingas
4f9e67d700 Support for chat message (WIP) 2019-08-03 12:58:48 +02:00
Nemirtingas
2a373bbf79 Now I set the invite instead of adding it.
You should send a lobby invite or a rich invite, but not both.
2019-08-02 23:01:24 +02:00
Nemirtingas
73fa7b50b5 Moved some code to functions. 2019-08-02 15:26:16 +02:00
Nemirtingas
8fe7c2267a User must now accept invite 2019-08-02 13:02:20 +02:00
Nemirtingas
156bee1564 Invitation & Chat support (WIP) 2019-08-02 11:16:30 +02:00
Nemirtingas
300832ebb3 I think i should protect this 2019-08-02 09:09:32 +02:00
Nemirtingas
7137fae413 Added error checks for renderer hooks
Added errors checks but there are no error correction, If it fails your won't have any overlay at all.
2019-08-02 09:07:53 +02:00
Nemirtingas
3a0d9c55c1 Added support for dynamic d3dcompile load
If you really want to use d3dcompile, then I think its better to find the most recent d3dcompile you have on your computer and load its D3DCompile function.
This process is now automatically handled. Just define  the right Preprocessor.
2019-08-02 09:06:59 +02:00
Nemirtingas
e674cd96e5 DX9 Hook info comment 2019-08-01 19:07:19 +02:00
Nemirtingas
c293c1ae05 Fixed game shutdown hang.
Should watch the other implementations if they need the same treat or not.
2019-08-01 17:05:41 +02:00
Nemirtingas
dda1e3210c Fixed dual hook on last function call 2019-08-01 17:04:49 +02:00
Nemirtingas
890f19c20a Fixing cross compiling with clang-cl 2019-08-01 15:58:24 +02:00
Nemirtingas
d646f61582 Removed numeric (don't use iota anymore)
Also placed the include on the top of cpp file.
Need to look into directinput and xinput hooks.
2019-08-01 15:56:56 +02:00
Nemirtingas
a08c8102a9 Use already defined functions to invite user to game. 2019-08-01 15:56:50 +02:00
Nemirtingas
e6826d8ead Basic & Ugly implementation of overlay.
Overlay still WIP, don't look too much into the code.
I will do it better soon.
2019-08-01 15:47:47 +02:00
Nemirtingas
631bcf9edf Updated hooks. 2019-08-01 15:47:43 +02:00
Nemirtingas
6328b59b0b Added opengl hook 2019-08-01 15:47:38 +02:00
Nemirtingas
bf9d85755c Added overlay base 2019-07-25 23:33:07 +02:00
Nemirtingas
3d3c8b26cd Added ImGui precompiled shaders
(And removed dependency to d3dcompile)
2019-07-25 23:32:52 +02:00
Nemirtingas
2ba8cae64e Added DirectX hooks
Warning: DX9 doesn't support resizing (TODO), DX12 has not beed tested and is not finished.
No OpenGL support for now.
2019-07-25 23:21:03 +02:00