Commit Graph

137 Commits (master)

Author SHA1 Message Date
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.
5 years ago
Nemirtingas 8abb0c8bc2 Add close button for overlay 5 years ago
Nemirtingas 6c09635600 Added the possibility to create new fonts.
Fonts cannot be created after a NewFrame call.
5 years ago
Nemirtingas e82579b82c Update steam_overlay.h 5 years ago
Nemirtingas 2db31928e9 Notifications 5 years ago
Nemirtingas 344674b889 revert of "Should fix the cursor until we draw our own cursor." 5 years ago
Nemirtingas 6ebc946607 Fixed overlay now showing on some games
In sanctum2, not writing in our own context makes the game crash.
5 years ago
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.
5 years ago
Nemirtingas ecd753422b Updated Linux X11 & OLGX hooks.
Use LD_PRELOAD=$PWD/libsteam_api.so app_name to load overlay.
5 years ago
Nemirtingas d6f29ffffa Added logs for Linux_Detour 5 years ago
Nemirtingas 5af1d18a8f Fixed overlay thread joining on himself 5 years ago
Nemirtingas 95e87eb832 Clean Linux Detour 5 years ago
Nemirtingas b9cd9ae6c2 Fix build 5 years ago
Nemirtingas 1785ae6eaf Moved every platform specific code to their own folder 5 years ago
Nemirtingas 549dc7c50e This carries window exit 5 years ago
Nemirtingas c27ab3993c Linux renderer detection 5 years ago
Nemirtingas 86f94bc337 Linux hooks 5 years ago
Nemirtingas 0573c4eb94 Windows only part 5 years ago
Nemirtingas 495bc957cd Added some os detection
Need to detect linux x86 or x64
5 years ago
Nemirtingas 92ed36f499 Linux version of detour 5 years ago
Nemirtingas b6eb929383 Should fix the cursor until we draw our own cursor. 5 years ago
Nemirtingas 4f7e42a905 Call the true function before initializing hook. 5 years ago
Nemirtingas 3c265596a9 Removed DX12 until further notice. 5 years ago
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.
5 years ago
Nemirtingas 36e8966223 Cleanup again 5 years ago
Nemirtingas 04847abeb7 Overlay & Hook cleanup. 5 years ago
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.
5 years ago
Nemirtingas ff25f294f0 Fixed typo 5 years ago
Nemirtingas 9b178146c4 Cleaned a bit hooks and added sanity checks. 5 years ago
Nemirtingas d0251b0b01 Some kind of DX12 hook 5 years ago
Nemirtingas 8e07dd0c6b Changed window detection. 5 years ago
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.
5 years ago
Nemirtingas cd8c5fc2ea Fixed memory leak 5 years ago
Nemirtingas 42a22dd4bb Don't free objects with shutdown
Some games don't like to free the DX objects after the game has shut down.
5 years ago
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.
5 years ago
Nemirtingas 0fa2d82c67 Fixed overlay on x64
They are not longer available with GetWindowLong. There is a new function GetWindowLongPtr.
GWLP* must be used.
5 years ago
Nemirtingas 5a0653d080 Refactor dx device creation
Find the game's window instead of using the foreground window.
5 years ago
Nemirtingas dc7480c633 Better compatibility for dx10 and 11 5 years ago
Nemirtingas 8757f4a548 Fixed ressource leaks. 5 years ago
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.
5 years ago
Nemirtingas 5893b69d1f Partially working DX12 overlay
DX12 hook seems ok, there are some bugs remaining.
ImGui setup for DX12 doesn't work.
5 years ago
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>.
5 years ago
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.
5 years ago
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.
5 years ago
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.
5 years ago
Nemirtingas fdeb5912d3 Try to Disable all inputs when overlay is on 5 years ago
Nemirtingas 757dc479e4 Removed inline 5 years ago
Nemirtingas 5d4b4371f3 Fixed everything that I've forgot 5 years ago
Nemirtingas d06fbba104 Added error handling when hook fails 5 years ago
Nemirtingas 1b37e837a1 Notification sound when something happen 5 years ago
Nemirtingas 7b53134512 Initialize overlay after full initialization of UI. 5 years ago
Nemirtingas 05f3fa09b3 Better compatibility for DX10 & DX11
Create a NULL Device (We only need it to retrieve its vtable)
5 years ago
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.
5 years ago
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.
5 years ago
Nemirtingas 4d3c355fcc Renammed hook_<renderer> to start_hook 5 years ago
Nemirtingas 2fe5e90294 Reworked booleans 5 years ago
Nemirtingas 8abd24ca54 Re-enabled auto join if overlay is not ready 5 years ago
Nemirtingas 3516b98042 Replaced wildcard with sed. 5 years ago
Nemirtingas 6224350142 Fixed compilation for windows 5 years ago
Nemirtingas d87760b78b Created a define to not compile overlay. 5 years ago
Nemirtingas 3eeca9b50e Modified a bit overlay and added comments 5 years ago
Nemirtingas 2c74abd6ab Moved this docs to the tool's doc 5 years ago
Nemirtingas 56b4e6a7c7 Added preprocessor exclusion for linux 5 years ago
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.
5 years ago
Nemirtingas 9f3e3a95da Cleaned hooks
I don't even know why I thought it was a good idea to hook dispatchMessage.
5 years ago
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.
5 years ago
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.
5 years ago
Nemirtingas 4f9e67d700 Support for chat message (WIP) 5 years ago
Nemirtingas 2a373bbf79 Now I set the invite instead of adding it.
You should send a lobby invite or a rich invite, but not both.
5 years ago
Nemirtingas 73fa7b50b5 Moved some code to functions. 5 years ago
Nemirtingas 8fe7c2267a User must now accept invite 5 years ago
Nemirtingas 156bee1564 Invitation & Chat support (WIP) 5 years ago
Nemirtingas 300832ebb3 I think i should protect this 5 years ago
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.
5 years ago
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.
5 years ago
Nemirtingas e674cd96e5 DX9 Hook info comment 5 years ago
Nemirtingas c293c1ae05 Fixed game shutdown hang.
Should watch the other implementations if they need the same treat or not.
5 years ago
Nemirtingas dda1e3210c Fixed dual hook on last function call 5 years ago
Nemirtingas 890f19c20a Fixing cross compiling with clang-cl 5 years ago
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.
5 years ago
Nemirtingas a08c8102a9 Use already defined functions to invite user to game. 5 years ago
Nemirtingas e6826d8ead Basic & Ugly implementation of overlay.
Overlay still WIP, don't look too much into the code.
I will do it better soon.
5 years ago
Nemirtingas 631bcf9edf Updated hooks. 5 years ago
Nemirtingas 6328b59b0b Added opengl hook 5 years ago
Nemirtingas bf9d85755c Added overlay base 5 years ago
Nemirtingas 3d3c8b26cd Added ImGui precompiled shaders
(And removed dependency to d3dcompile)
5 years ago
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.
5 years ago