|
|
|
@ -0,0 +1,155 @@
|
|
|
|
|
fix function signature in call to SteamGameServer_Init()
|
|
|
|
|
stub Steam::setDualSenseTriggerEffect
|
|
|
|
|
stub Steam::inputActionEventCallback
|
|
|
|
|
remove deprecated/incompatible namespaces ISteamHTMLSurface
|
|
|
|
|
InitiateGameConnection_DEPRECATED => InitiateGameConnection
|
|
|
|
|
|
|
|
|
|
Index: GodotSteam/godotsteam/godotsteam.cpp
|
|
|
|
|
--- GodotSteam/godotsteam/godotsteam.cpp.orig
|
|
|
|
|
+++ GodotSteam/godotsteam/godotsteam.cpp
|
|
|
|
|
@@ -461,7 +461,8 @@ bool Steam::serverInit(const String& ip, uint16 game_p
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
uint32_t ip4 = *((uint32_t *)address.get_ipv4());
|
|
|
|
|
- if(!SteamGameServer_Init(ip4, game_port, query_port, mode, version_string.utf8().get_data())){
|
|
|
|
|
+ /* use '0' in port for uint16 usSteamPort in the API */
|
|
|
|
|
+ if(!SteamGameServer_Init(ip4, 0, game_port, query_port, mode, version_string.utf8().get_data())){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
@@ -2389,7 +2390,7 @@ void Steam::keyChar(uint32 unicode_char, int key_modif
|
|
|
|
|
if(this_handle == 0){
|
|
|
|
|
this_handle = browser_handle;
|
|
|
|
|
}
|
|
|
|
|
- SteamHTMLSurface()->KeyChar(this_handle, unicode_char, (ISteamHTMLSurface::EHTMLKeyModifiers)key_modifiers);
|
|
|
|
|
+ SteamHTMLSurface()->KeyChar(this_handle, unicode_char, (EHTMLKeyModifiers)key_modifiers);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2400,7 +2401,7 @@ void Steam::keyDown(uint32 native_key_code, int key_mo
|
|
|
|
|
if(this_handle == 0){
|
|
|
|
|
this_handle = browser_handle;
|
|
|
|
|
}
|
|
|
|
|
- SteamHTMLSurface()->KeyDown(this_handle, native_key_code, (ISteamHTMLSurface::EHTMLKeyModifiers)key_modifiers);
|
|
|
|
|
+ SteamHTMLSurface()->KeyDown(this_handle, native_key_code, (EHTMLKeyModifiers)key_modifiers);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2411,7 +2412,7 @@ void Steam::keyUp(uint32 native_key_code, int key_modi
|
|
|
|
|
if(this_handle == 0){
|
|
|
|
|
this_handle = browser_handle;
|
|
|
|
|
}
|
|
|
|
|
- SteamHTMLSurface()->KeyUp(this_handle, native_key_code, (ISteamHTMLSurface::EHTMLKeyModifiers)key_modifiers);
|
|
|
|
|
+ SteamHTMLSurface()->KeyUp(this_handle, native_key_code, (EHTMLKeyModifiers)key_modifiers);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2433,7 +2434,7 @@ void Steam::mouseDoubleClick(int mouse_button, uint32
|
|
|
|
|
if(this_handle == 0){
|
|
|
|
|
this_handle = browser_handle;
|
|
|
|
|
}
|
|
|
|
|
- SteamHTMLSurface()->MouseDoubleClick(this_handle, (ISteamHTMLSurface::EHTMLMouseButton)mouse_button);
|
|
|
|
|
+ SteamHTMLSurface()->MouseDoubleClick(this_handle, (EHTMLMouseButton)mouse_button);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2444,7 +2445,7 @@ void Steam::mouseDown(int mouse_button, uint32 this_ha
|
|
|
|
|
if(this_handle == 0){
|
|
|
|
|
this_handle = browser_handle;
|
|
|
|
|
}
|
|
|
|
|
- SteamHTMLSurface()->MouseDown(this_handle, (ISteamHTMLSurface::EHTMLMouseButton)mouse_button);
|
|
|
|
|
+ SteamHTMLSurface()->MouseDown(this_handle, (EHTMLMouseButton)mouse_button);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2466,7 +2467,7 @@ void Steam::mouseUp(int mouse_button, uint32 this_hand
|
|
|
|
|
if(this_handle == 0){
|
|
|
|
|
this_handle = browser_handle;
|
|
|
|
|
}
|
|
|
|
|
- SteamHTMLSurface()->MouseUp(this_handle, (ISteamHTMLSurface::EHTMLMouseButton)mouse_button);
|
|
|
|
|
+ SteamHTMLSurface()->MouseUp(this_handle, (EHTMLMouseButton)mouse_button);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -3212,6 +3213,8 @@ bool Steam::setInputActionManifestFilePath(const Strin
|
|
|
|
|
|
|
|
|
|
// Set the trigger effect for a DualSense controller
|
|
|
|
|
void Steam::setDualSenseTriggerEffect(uint64_t input_handle, int parameter_index, int trigger_mask, int effect_mode, int position, int amplitude, int frequency){
|
|
|
|
|
+ return;
|
|
|
|
|
+ /*
|
|
|
|
|
if(SteamInput() != NULL){
|
|
|
|
|
ScePadTriggerEffectParam these_parameters;
|
|
|
|
|
memset(&these_parameters, 0, sizeof(these_parameters));
|
|
|
|
|
@@ -3242,6 +3245,7 @@ void Steam::setDualSenseTriggerEffect(uint64_t input_h
|
|
|
|
|
these_parameters.command[parameter_index].commandData.vibrationParam.frequency = frequency;
|
|
|
|
|
SteamInput()->SetDualSenseTriggerEffect((InputHandle_t)input_handle, &these_parameters);
|
|
|
|
|
}
|
|
|
|
|
+ */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//! Waits on an IPC event from Steam sent when there is new data to be fetched from the data drop. Returns true when data was recievied before the timeout expires. Useful for games with a dedicated input thread.
|
|
|
|
|
@@ -8251,7 +8255,7 @@ Dictionary Steam::initiateGameConnection(uint64_t serv
|
|
|
|
|
int authSize = 2048;
|
|
|
|
|
auth.resize(authSize);
|
|
|
|
|
CSteamID server = (uint64)server_id;
|
|
|
|
|
- if(SteamUser()->InitiateGameConnection_DEPRECATED(&auth, authSize, server, server_ip, server_port, secure) > 0){
|
|
|
|
|
+ if(SteamUser()->InitiateGameConnection(&auth, authSize, server, server_ip, server_port, secure) > 0){
|
|
|
|
|
connection["auth_blob"] = auth;
|
|
|
|
|
connection["server_id"] = server_id;
|
|
|
|
|
connection["server_ip"] = server_ip;
|
|
|
|
|
@@ -8350,7 +8354,7 @@ void Steam::stopVoiceRecording(){
|
|
|
|
|
//! Notify the game server that we are disconnecting. NOTE: This is part of the old user authentication API and should not be mixed with the new API.
|
|
|
|
|
void Steam::terminateGameConnection(uint32 server_ip, uint16 server_port){
|
|
|
|
|
if(SteamUser() != NULL){
|
|
|
|
|
- SteamUser()->TerminateGameConnection_DEPRECATED(server_ip, server_port);
|
|
|
|
|
+ SteamUser()->TerminateGameConnection(server_ip, server_port);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -10044,27 +10048,28 @@ void Steam::http_request_headers_received(HTTPRequestH
|
|
|
|
|
//
|
|
|
|
|
// Purpose: when callbacks are enabled this fires each time a controller action state changes
|
|
|
|
|
void Steam::inputActionEventCallback(SteamInputActionEvent_t* call_data){
|
|
|
|
|
- uint64_t input_handle = call_data->controllerHandle;
|
|
|
|
|
- int event_type = call_data->eEventType;
|
|
|
|
|
- uint64_t analog_handle = call_data->analogAction.actionHandle;
|
|
|
|
|
- uint64_t digital_handle = call_data->digitalAction.actionHandle;
|
|
|
|
|
+ return;
|
|
|
|
|
+ //uint64_t input_handle = call_data->controllerHandle;
|
|
|
|
|
+ //int event_type = call_data->eEventType;
|
|
|
|
|
+ //uint64_t analog_handle = call_data->analogAction.actionHandle;
|
|
|
|
|
+ //uint64_t digital_handle = call_data->digitalAction.actionHandle;
|
|
|
|
|
// Get the digital action data
|
|
|
|
|
- Dictionary digital_action;
|
|
|
|
|
- digital_action["state"] = call_data->digitalAction.digitalActionData.bState;
|
|
|
|
|
- digital_action["active"] = call_data->digitalAction.digitalActionData.bActive;
|
|
|
|
|
+ //Dictionary digital_action;
|
|
|
|
|
+ //digital_action["state"] = call_data->digitalAction.digitalActionData.bState;
|
|
|
|
|
+ //digital_action["active"] = call_data->digitalAction.digitalActionData.bActive;
|
|
|
|
|
// Get the analog action data
|
|
|
|
|
- Dictionary analog_action;
|
|
|
|
|
- analog_action["mode"] = call_data->analogAction.analogActionData.eMode;
|
|
|
|
|
- analog_action["x"] = call_data->analogAction.analogActionData.x;
|
|
|
|
|
- analog_action["y"] = call_data->analogAction.analogActionData.y;
|
|
|
|
|
- analog_action["active"] = call_data->analogAction.analogActionData.bActive;
|
|
|
|
|
+ //Dictionary analog_action;
|
|
|
|
|
+ //analog_action["mode"] = call_data->analogAction.analogActionData.eMode;
|
|
|
|
|
+ //analog_action["x"] = call_data->analogAction.analogActionData.x;
|
|
|
|
|
+ //analog_action["y"] = call_data->analogAction.analogActionData.y;
|
|
|
|
|
+ //analog_action["active"] = call_data->analogAction.analogActionData.bActive;
|
|
|
|
|
// Split into a dictionary since Godot won't allow more than 6 arguments sent back
|
|
|
|
|
- Dictionary action_information;
|
|
|
|
|
- action_information["analog_action_handle"] = analog_handle;
|
|
|
|
|
- action_information["analog_action_data"] = analog_action;
|
|
|
|
|
- action_information["digital_action_handle"] = digital_handle;
|
|
|
|
|
- action_information["digital_action_data"] = digital_action;
|
|
|
|
|
- emit_signal("input_action_event", input_handle, event_type, action_information);
|
|
|
|
|
+ //Dictionary action_information;
|
|
|
|
|
+ //action_information["analog_action_handle"] = analog_handle;
|
|
|
|
|
+ //action_information["analog_action_data"] = analog_action;
|
|
|
|
|
+ //action_information["digital_action_handle"] = digital_handle;
|
|
|
|
|
+ //action_information["digital_action_data"] = digital_action;
|
|
|
|
|
+ //emit_signal("input_action_event", input_handle, event_type, action_information);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//! Purpose: called when a new controller has been connected, will fire once per controller if multiple new controllers connect in the same frame
|