update to Godot 3.5.1, includes update to newer GodotSteam based on Steam SDK 1.55. ok op@ (maintainer)

This commit is contained in:
thfr 2022-10-10 18:39:05 +00:00
parent 9e6315d88b
commit dc7f8f409b
6 changed files with 189 additions and 14 deletions

View File

@ -3,8 +3,10 @@ BROKEN-powerpc = fails at runtime, the UI is totally blank
COMMENT-main = 2D and 3D game engine
COMMENT-tools= 2D and 3D game engine (with tools)
V = 3.5
GODOTSTEAM_V = g34-s152-gs311
V = 3.5.1
# Later versions of GodotSteam need isteamdualsense.h.
# Can only update once that is part of games/goldberg_emulator
GODOTSTEAM_V = g35-s155-gs3171
DISTNAME = godot-${V}-stable
PKGNAME = godot-${V}
@ -63,7 +65,7 @@ MODSCONS_FLAGS = CC="${CC}" \
builtin_pcre2=no \
builtin_zlib=no \
builtin_zstd=no \
custom_modules=${WRKDIR}/GodotSteam-${GODOTSTEAM_V}/godotsteam \
custom_modules=${WRKSRC}/GodotSteam/godotsteam \
progress=no \
pulseaudio=no \
verbose=yes \
@ -117,17 +119,15 @@ WANTLIB += atomic
CFLAGS += -I${LOCALBASE}/include/goldberg_emulator
# symlink to allow patching GodotSteam
post-extract:
cp -R ${FILESDIR}/sndio ${WRKDIST}/drivers
cp ${FILESDIR}/ujoy/joypad_openbsd.{cpp,h} \
${WRKDIST}/platform/x11/
ln -sf ${WRKDIR}/GodotSteam-${GODOTSTEAM_V} ${WRKSRC}/GodotSteam
pre-configure:
${SUBST_CMD} ${WRKSRC}/misc/dist/linux/*.desktop
sed -E -i 's/ISteamHTMLSurface:://g' \
${WRKDIR}/GodotSteam-${GODOTSTEAM_V}/godotsteam/godotsteam.cpp
sed -E -i 's/Connection_DEPRECATED/Connection/g' \
${WRKDIR}/GodotSteam-${GODOTSTEAM_V}/godotsteam/godotsteam.cpp
do-build:
@${MODSCONS_BUILD_TARGET} tools=no target=release

View File

@ -1,4 +1,4 @@
SHA256 (godot-3.5/g34-s152-gs311.tar.gz) = hjoW9t+RN6JTjWn2RhEZ2H7EljJ5tV5ybU4JwK/6wpc=
SHA256 (godot-3.5/godot-3.5-stable.tar.xz) = IqRwZTkriioZaQ20IIWydWwvZ5lr0kaIyxcwf4pLWcg=
SIZE (godot-3.5/g34-s152-gs311.tar.gz) = 197461
SIZE (godot-3.5/godot-3.5-stable.tar.xz) = 24044340
SHA256 (godot-3.5.1/g35-s155-gs3171.tar.gz) = ZmX0vXnW1/wGxY/7OQYE0XLRf0eCTlJlFWSKI1DcP/E=
SHA256 (godot-3.5.1/godot-3.5.1-stable.tar.xz) = 9ODZBFtlnTbfB61uDFtU40VRvOJhjaJUnY+AiXSax2c=
SIZE (godot-3.5.1/g35-s155-gs3171.tar.gz) = 186585
SIZE (godot-3.5.1/godot-3.5.1-stable.tar.xz) = 24153448

View File

@ -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

View File

@ -0,0 +1,20 @@
don't use isteamdualsense.h API while not part of games/goldberg_emulator
Index: GodotSteam/godotsteam/godotsteam.h
--- GodotSteam/godotsteam/godotsteam.h.orig
+++ GodotSteam/godotsteam/godotsteam.h
@@ -23,7 +23,6 @@
#include "steam/steam_api.h"
#include "steam/steam_gameserver.h"
#include "steam/steamnetworkingfakeip.h"
-#include "steam/isteamdualsense.h"
// Include Godot headers
#include "core/object.h"
@@ -1733,4 +1732,4 @@ class Steam: public Object {
CCallResult<Steam, CheckFileSignature_t> callResultCheckFileSignature;
void check_file_signature(CheckFileSignature_t *call_data, bool io_failure);
};
-#endif // GODOTSTEAM_H
\ No newline at end of file
+#endif // GODOTSTEAM_H

View File

@ -4,7 +4,7 @@ https://github.com/godotengine/godot/pull/61540
Index: drivers/unix/os_unix.cpp
--- drivers/unix/os_unix.cpp.orig
+++ drivers/unix/os_unix.cpp
@@ -491,12 +491,6 @@ String OS_Unix::get_executable_path() const {
@@ -497,12 +497,6 @@ String OS_Unix::get_executable_path() const {
return OS::get_executable_path();
}
return b;
@ -17,7 +17,7 @@ Index: drivers/unix/os_unix.cpp
#elif defined(__FreeBSD__)
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
char buf[MAXPATHLEN];
@@ -523,7 +517,6 @@ String OS_Unix::get_executable_path() const {
@@ -529,7 +523,6 @@ String OS_Unix::get_executable_path() const {
return path;
#else

View File

@ -57,7 +57,7 @@ Index: platform/x11/detect.py
# Linkflags below this line should typically stay the last ones
if not env["builtin_zlib"]:
env.ParseConfig("pkg-config zlib --cflags --libs")
@@ -411,11 +395,6 @@ def configure(env):
@@ -413,11 +397,6 @@ def configure(env):
print(
"Warning: Creating template binaries enabled for PCK embedding is currently only supported with GNU ld, not gold or LLD."
)