The Corsair User Forums  

Go Back   The Corsair User Forums > Corsair Product Discussion > Legacy Corsair Software > CUE 1.x and 2.x RGB Profiles and Profile Discussions

 
 
Thread Tools Search this Thread Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #1  
Old 05-08-2015, 05:01 AM
VRocker VRocker is offline
Registered User
VRocker's PC Specs
 
Join Date: Nov 2008
Posts: 13
POST ID # = 777998
VRocker Reputation: 10
Big Grin [WIP] GTA V dynamic lighting

Ever since i learned that GTAV has support for the Logitech gaming keyboards to provide dynamic lighting, i have been determined to bring the same functionality to my Corsair K70 RGB.
After some messing around (and a tiny bit of reverse engineering) i finally have a working prototype!


How?
Rockstar was kind enough to build support for RGB keyboards directly into GTAV. Unfortunately the only keyboard they support is Logitech as they provide a nice API (hint hint corsair )

This mod is a simple DLL which makes use of the built in functionality by processing the lighting calls and translating them to Corsair-friendly ones.

Is it online-safe?
Theoretically it should be safe to play online with due to how it works. If the anticheat measures work like every other AC then this won't get flagged as a cheat and therefor won't get you banned (i'm not responsible if this does however)
This DLL does not read or write any of the internal GTA memory and doesn't use commonly blacklisted API calls such as Read/WriteProcessMemory. It also doesn't inject itself in as GTA is friendly enough to ask to load the DLL rather than being told to

What keyboard does this work with?
Now that it uses the CUESDK, it should work with all devices

Where can i get this?
Check the attachments to this post

Where can i get the source code?
I have uploaded the source code to GitHub or you all to enjoy! https://github.com/VRocker/LogiLed2Corsair

Update: This now works with the M65 RGB mouse too! :o
Update 2: When modifying the registrypatch file, put double backslahes in the path. E.G. C:\\Games\\GTAV\\LogitechLED.dll else it won't work
Update 3: Seems Rockstar updated their Logitech SDK in the last patch which broke this DLL. I have adapted it to work with GTA but police lights don't seem to work anymore. I'm not sure if Rockstar removed them or they're calling some other function
Update 4: Updated the DLL to use the CUESDK. Also made it work for The Division Beta :o
Attached Files
File Type: zip LogiLed2Corsair.zip (60.4 KB, 1338 views)

Last edited by VRocker; 02-20-2016 at 12:24 PM. Reason: Registry patch notes


2 members found this post helpful.
  #2  
Old 05-08-2015, 01:06 PM
goomonster3 goomonster3 is offline
Registered User
 
Join Date: Mar 2015
Posts: 44
POST ID # = 778104
goomonster3 Reputation: 10
Default

Quote:
Originally Posted by VRocker View Post
Ever since i learned that GTAV has support for the Logitech gaming keyboards to provide dynamic lighting, i have been determined to bring the same functionality to my Corsair K70 RGB.
After some messing around (and a tiny bit of reverse engineering) i finally have a working prototype!

https://youtu.be/yetop0FVhsI

How?
Rockstar was kind enough to build support for RGB keyboards directly into GTAV. Unfortunately the only keyboard they support is Logitech as they provide a nice API (hint hint corsair )

This mod is a simple DLL which makes use of the built in functionality by processing the lighting calls and translating them to Corsair-friendly ones.
This was possible thanks to LibCorsairRGB (although i did modify it to remove the libusb dependancy and use native Windows APIs)

Is it online-safe?
Theoretically it should be safe to play online with due to how it works. If the anticheat measures work like every other AC then this won't get flagged as a cheat and therefor won't get me banned.
This DLL does not read or write any of the internal GTA memory and doesn't use commonly blacklisted API calls such as Read/WriteProcessMemory. It also doesn't inject itself in as GTA is friendly enough to ask to load the DLL rather than being told to

Why are only the F keys lit?
I haven't had much time to dedicate to this project lately and only got it working 5 minutes before i was due to leave for work this morning so the F keys were the easiest to hook up. Once i've written the full keymap translator (to change from logitech to corsair) then all keys will be lit and reactive exactly how Rockstar intended it to be

Does CUE need to be closed?
Currently yes, i am investigating methods on how to make this work alongside CUE. All of the methods i can think of involve injecting into CUE and either nullifying the calls that send the data to the keyboard while GTA is running or using CUE to change the lighting. I'm not sure if this will upset the anticheat in GTA though so i'm hesitant to try...

What keyboard does this work with?
Currently I am testing this on my K70 RGB but it should also work with the K95 and possibly the K65. Only time will tell!
I am also looking into the possibility of hooking up mouse lighting as i have an M65 RGB which I really want flashing when the cops chase me

Where can i get this?
When i have the full keyboard lighting hooked up and i'm happy with the stability, i will be releasing this DLL for everybody to enjoy! So stay posted

Will this be open-sourced?
My plan is to eventually open-source this project so people can see how I got this working and hopefully port it to other games. Theoretically this DLL could work with other games that utilise the Logitech API (such as LoL) but I don't have these games to test with.

Good job, if I may ask how are you actually getting the data without using readprocessmemory, any chance you could release the source code :)?


  #3  
Old 05-08-2015, 01:26 PM
Yakov's Avatar
Yakov Yakov is offline
No Russian.
Yakov's PC Specs
 
Join Date: Oct 2014
Posts: 27
POST ID # = 778111
Yakov Reputation: 10
Default

Quote:
Originally Posted by goomonster3 View Post
Good job, if I may ask how are you actually getting the data without using readprocessmemory, any chance you could release the source code :)?
"Will this be open-sourced?
My plan is to eventually open-source this project so people can see how I got this working and hopefully port it to other games. Theoretically this DLL could work with other games that utilise the Logitech API (such as LoL) but I don't have these games to test with.
"


  #4  
Old 05-08-2015, 02:23 PM
goomonster3 goomonster3 is offline
Registered User
 
Join Date: Mar 2015
Posts: 44
POST ID # = 778119
goomonster3 Reputation: 10
Default

Quote:
Originally Posted by Yakov View Post
"Will this be open-sourced?
My plan is to eventually open-source this project so people can see how I got this working and hopefully port it to other games. Theoretically this DLL could work with other games that utilise the Logitech API (such as LoL) but I don't have these games to test with.
"
Sorry; I meant like tell me / post his source for the bit on his reading the game data part


  #5  
Old 05-08-2015, 03:45 PM
VRocker VRocker is offline
Registered User
VRocker's PC Specs
 
Join Date: Nov 2008
Posts: 13
POST ID # = 778134
VRocker Reputation: 10
Default

Quote:
Originally Posted by goomonster3 View Post
Sorry; I meant like tell me / post his source for the bit on his reading the game data part
I created a DLL which mimics the LogitechLED API and tell the game to load this rather than Logitechs. GTA then calls these functions and i translate to Corsair.

The source is now on GitHub if you want a mooch :)


  #6  
Old 05-08-2015, 05:07 PM
stevvie stevvie is offline
Registered User
stevvie's PC Specs
 
Join Date: Dec 2007
Posts: 191
POST ID # = 778145
stevvie Reputation: 10
Default

Anyone else tried on K95 RGB yet. I did and it didn't change a thing on my keyboard. This would be a really nice addition to this keyboard

Last edited by stevvie; 05-08-2015 at 05:16 PM.


  #7  
Old 05-09-2015, 01:15 PM
gpvecchi's Avatar
gpvecchi gpvecchi is offline
Registered User
gpvecchi's PC Specs
 
Join Date: Aug 2012
Location: 44°43'25.02"N 10°23'55.59"E
Posts: 273
POST ID # = 778284
gpvecchi Reputation: 10
Default

Deleted.....


  #8  
Old 05-09-2015, 03:20 PM
SchmittyThePira SchmittyThePira is offline
Registered User
 
Join Date: Feb 2015
Posts: 5
POST ID # = 778295
SchmittyThePira Reputation: 10
Default

I'm having some trouble, unfortunately. Followed the instructions twice but can't seem to get it working.

Relevant specs:
Windows 10 Technical Preview
K70 RGB (latest firmware)
64-bit GTA V

Any suggestions?


  #9  
Old 05-09-2015, 07:09 PM
VRocker VRocker is offline
Registered User
VRocker's PC Specs
 
Join Date: Nov 2008
Posts: 13
POST ID # = 778335
VRocker Reputation: 10
Default

Strange, did you modify and run the RegistryPatch file? What is the path you added to it?


  #10  
Old 05-09-2015, 07:21 PM
Paul S's Avatar
Paul S Paul S is offline
Registered User
Paul S's PC Specs
 
Join Date: Mar 2015
Location: England
Posts: 270
POST ID # = 778338
Paul S Reputation: 10
Default

the flashing police lights is a nice touch


  #11  
Old 05-09-2015, 07:37 PM
SchmittyThePira SchmittyThePira is offline
Registered User
 
Join Date: Feb 2015
Posts: 5
POST ID # = 778346
SchmittyThePira Reputation: 10
Default

Quote:
Originally Posted by VRocker View Post
Strange, did you modify and run the RegistryPatch file? What is the path you added to it?
Yeah, I modified and ran the file. Path is D:\SteamLibrary\steamapps\common\Grand Theft Auto V\LogitechLED.dll

Not sure if this has any relevance, but my keyboard's connected via USB 2.0.


  #12  
Old 05-11-2015, 03:01 AM
VRocker VRocker is offline
Registered User
VRocker's PC Specs
 
Join Date: Nov 2008
Posts: 13
POST ID # = 778482
VRocker Reputation: 10
Default

Looks right... Only thing i can think of is you might be missing the Visual C++ 2013 redistributable. Try installing this: https://www.microsoft.com/en-gb/down....aspx?id=40784 and see if that helps.

If that fails, i'll throw a test app together to do some debugging.


  #13  
Old 05-11-2015, 12:25 PM
SchmittyThePira SchmittyThePira is offline
Registered User
 
Join Date: Feb 2015
Posts: 5
POST ID # = 778548
SchmittyThePira Reputation: 10
Default

Quote:
Originally Posted by VRocker View Post
Looks right... Only thing i can think of is you might be missing the Visual C++ 2013 redistributable. Try installing this: https://www.microsoft.com/en-gb/down....aspx?id=40784 and see if that helps.

If that fails, i'll throw a test app together to do some debugging.
I'll give that a shot this evening. Thanks.


  #14  
Old 05-11-2015, 03:10 PM
gpvecchi's Avatar
gpvecchi gpvecchi is offline
Registered User
gpvecchi's PC Specs
 
Join Date: Aug 2012
Location: 44°43'25.02"N 10°23'55.59"E
Posts: 273
POST ID # = 778585
gpvecchi Reputation: 10
Default

Nope for me either. I just have the doubt of inserting path in the right way in the REG file.
Is this right?

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{a6519e67-7632-4375-afdf-caa889744403}\ServerBinary]
@="C:\Games\Grand Theft Auto V\LogitechLed.dll"

Thanks! Oh, I have the visual C++ installed...
EDIT: manually checking the registry doesn't show anything in that registry. Shouldn't be 2 different versions for 32 and 64 bits?

Last edited by gpvecchi; 05-11-2015 at 03:14 PM.


  #15  
Old 05-11-2015, 04:07 PM
VRocker VRocker is offline
Registered User
VRocker's PC Specs
 
Join Date: Nov 2008
Posts: 13
POST ID # = 778596
VRocker Reputation: 10
Default

The only thing i can think of with the registry key is try with double backslashes, so C:\Games\Grand Theft Auto V\LogitechLed.dll would become C:\\Games\\Grand Theft Auto V\\LogitechLed.dll

I'm stumped as to why this isn't working for others :/


 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:06 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.