Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to SDK v66 #7

Merged
merged 3 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
branches: [ "main" ]

env:
OCULUS_VERSION: 59
OCULUS_VERSION: 66
GODOT_ENGINE_VERSION: "4.2.0"
GODOT_ENGINE_STAGE: "stable"
INTEGRATION_VERSION: "v1.4.0-beta"
INTEGRATION_VERSION: "v1.5.0-beta"

jobs:
lint:
Expand Down Expand Up @@ -43,19 +43,19 @@ jobs:
artifact-name: windows

- name: macOS
os: "macos-11"
os: "macos-latest"
api-platform: mac
scons-platform: macos
artifact-name: macos

- name: Linux
os: "ubuntu-20.04"
os: "ubuntu-latest"
api-platform: linux
scons-platform: linux
artifact-name: linux

- name: Android
os: "ubuntu-20.04"
os: "ubuntu-latest"
api-platform: android
scons-platform: android
flags: arch=arm64v8
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
if: matrix.api-platform == 'android'

- name: Install Scons
run: python -m pip install scons
run: python -m pip install scons==4.0.0

- name: Compile Debug library
shell: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="Godot Oculus Platform"
description="An open-source implementation of the Oculus Platform SDK intended to be used with the Quest platform."
author="Daniel Castellanos"
version="1.4.0"
version="1.5.0"
script="export_plugin.gd"
Binary file not shown.
2 changes: 2 additions & 0 deletions demo/menu/menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ extends CanvasLayer

func _ready() -> void:

$PanelContainer/GodotVersionLbl.text = "Godot version: %s" % Engine.get_version_info().string

## SIGNALS
GDOculusPlatform.abuse_report_form_requested.connect(_handle_abuse_report_form_request)

Expand Down
8 changes: 7 additions & 1 deletion demo/menu/menu.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ achievements_get_definitions_by_name = Array[String](["TEST_BITFIELD_ACHIEV_0",
achievements_get_progress_by_name = Array[String](["TEST_COUNT_ACHIEV_0", "TEST_SIMPLE_ACHIEV_0"])
IAP_get_products_by_sku = Array[String](["test_consumable_0", "test_durable_0"])
IAP_consume_purchase = "test_consumable_0"
IAP_launch_checkout_flow = "test_durable_0"
IAP_launch_checkout_flow = "test_consumable_0"
assetfile_status_by_id = "6355075617871935"
assetfile_status_by_name = "dlc_1.pck"
assetfile_download_by_id = "6355075617871935"
Expand Down Expand Up @@ -844,6 +844,12 @@ layout_mode = 2
size_flags_horizontal = 4
text = "UserAgeCategoryReport"

[node name="GodotVersionLbl" type="Label" parent="PanelContainer"]
layout_mode = 2
size_flags_vertical = 8
text = "Godot version: "
horizontal_alignment = 1

[connection signal="pressed" from="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs/HFlowContainer/ApplicationGetVersion" to="." method="_on_application_get_version_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs/HFlowContainer/ApplicationStartAppDownload" to="." method="_on_application_start_app_download_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs/HFlowContainer/ApplicationCheckAppDownloadProgress" to="." method="_on_application_check_app_download_progress_pressed"]
Expand Down
14 changes: 12 additions & 2 deletions src/godot_oculus_platform_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -668,13 +668,23 @@ bool GDOculusPlatform::initialize_android(const String &p_app_id, const Dictiona
return true;

} else {
ovrKeyValuePair config_options[1];
ovrKeyValuePair config_options[2];

// Make sure initialization options are valid
if (p_initialization_options.has("disable_p2p_networking")) {
ERR_FAIL_COND_V_MSG(p_initialization_options.get("disable_p2p_networking", 0).get_type() != Variant::BOOL, false, "[GDOP] Invalid initialization options. The disable_p2p_networking key must have a boolean value.");

config_options[0] = ovr_InitConfigOption_CreateBool(ovrInitConfigOption_DisableP2pNetworking, (bool)p_initialization_options.get("disable_p2p_networking", false));
config_options[0] = ovr_InitConfigOption_CreateBool(ovrInitConfigOption_DisableP2pNetworking, (bool)p_initialization_options.get("disable_p2p_networking", true));
} else {
config_options[0] = ovr_InitConfigOption_CreateBool(ovrInitConfigOption_DisableP2pNetworking, true);
}

if (p_initialization_options.has("enable_cowatching")) {
ERR_FAIL_COND_V_MSG(p_initialization_options.get("enable_cowatching", 0).get_type() != Variant::BOOL, false, "[GDOP] Invalid initialization options. The enable_cowatching key must have a boolean value.");

config_options[1] = ovr_InitConfigOption_CreateBool(ovrInitConfigOption_EnableCowatching, (bool)p_initialization_options.get("enable_cowatching", false));
} else {
config_options[1] = ovr_InitConfigOption_CreateBool(ovrInitConfigOption_EnableCowatching, false);
}

JNIEnv *gdjenv;
Expand Down
2 changes: 1 addition & 1 deletion src/godot_oculus_platform_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ GDOculusPlatform::~GDOculusPlatform() {
void GDOculusPlatform::pump_messages() {}

Ref<GDOculusPlatformPromise> _empty_func_helper() {
Ref<GDOculusPlatformPromise> promise;
Ref<GDOculusPlatformPromise> promise = memnew(GDOculusPlatformPromise(-1));
ERR_FAIL_V_MSG(promise, "Godot Oculus Platform only works with the Meta Quest (android).");

return promise;
Expand Down
4 changes: 4 additions & 0 deletions src/include/OVR_AppDownloadResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
#define OVR_APPDOWNLOADRESULT_H

#include "OVR_Platform_Defs.h"
#include "OVR_AppInstallResult.h"

typedef struct ovrAppDownloadResult *ovrAppDownloadResultHandle;

/// Result of the download or install operation returned by the installer
OVRP_PUBLIC_FUNCTION(ovrAppInstallResult) ovr_AppDownloadResult_GetAppInstallResult(const ovrAppDownloadResultHandle obj);

/// Timestamp in milliseconds when the operation finished.
OVRP_PUBLIC_FUNCTION(long long) ovr_AppDownloadResult_GetTimestamp(const ovrAppDownloadResultHandle obj);

Expand Down
27 changes: 27 additions & 0 deletions src/include/OVR_AppInstallResult.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!

#ifndef OVR_APP_INSTALL_RESULT_H
#define OVR_APP_INSTALL_RESULT_H

#include "OVR_Platform_Defs.h"

typedef enum ovrAppInstallResult_ {
ovrAppInstallResult_Unknown,
ovrAppInstallResult_LowStorage,
ovrAppInstallResult_NetworkError,
ovrAppInstallResult_DuplicateRequest,
ovrAppInstallResult_InstallerError,
ovrAppInstallResult_UserCancelled,
ovrAppInstallResult_AuthorizationError,
ovrAppInstallResult_Success,
} ovrAppInstallResult;

/// Converts an ovrAppInstallResult enum value to a string
/// The returned string does not need to be freed
OVRPL_PUBLIC_FUNCTION(const char*) ovrAppInstallResult_ToString(ovrAppInstallResult value);

/// Converts a string representing an ovrAppInstallResult enum value to an enum value
///
OVRPL_PUBLIC_FUNCTION(ovrAppInstallResult) ovrAppInstallResult_FromString(const char* str);

#endif
1 change: 1 addition & 0 deletions src/include/OVR_AppStatus.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ typedef enum ovrAppStatus_ {
ovrAppStatus_Installing,
ovrAppStatus_Installed,
ovrAppStatus_Uninstalling,
ovrAppStatus_InstallQueued,
} ovrAppStatus;

/// Converts an ovrAppStatus enum value to a string
Expand Down
18 changes: 18 additions & 0 deletions src/include/OVR_CowatchViewer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!

#ifndef OVR_COWATCHVIEWER_H
#define OVR_COWATCHVIEWER_H

#include "OVR_Platform_Defs.h"
#include "OVR_Types.h"

typedef struct ovrCowatchViewer *ovrCowatchViewerHandle;

/// Viewer data set by this cowatching viewer.
OVRP_PUBLIC_FUNCTION(const char *) ovr_CowatchViewer_GetData(const ovrCowatchViewerHandle obj);

/// User ID of the owner of data.
OVRP_PUBLIC_FUNCTION(ovrID) ovr_CowatchViewer_GetId(const ovrCowatchViewerHandle obj);


#endif
18 changes: 18 additions & 0 deletions src/include/OVR_CowatchViewerArray.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!

#ifndef OVR_COWATCHVIEWERARRAY_H
#define OVR_COWATCHVIEWERARRAY_H

#include "OVR_Platform_Defs.h"
#include "OVR_CowatchViewer.h"
#include <stdbool.h>
#include <stddef.h>

typedef struct ovrCowatchViewerArray *ovrCowatchViewerArrayHandle;

OVRP_PUBLIC_FUNCTION(ovrCowatchViewerHandle) ovr_CowatchViewerArray_GetElement(const ovrCowatchViewerArrayHandle obj, size_t index);
OVRP_PUBLIC_FUNCTION(const char *) ovr_CowatchViewerArray_GetNextUrl(const ovrCowatchViewerArrayHandle obj);
OVRP_PUBLIC_FUNCTION(size_t) ovr_CowatchViewerArray_GetSize(const ovrCowatchViewerArrayHandle obj);
OVRP_PUBLIC_FUNCTION(bool) ovr_CowatchViewerArray_HasNextPage(const ovrCowatchViewerArrayHandle obj);

#endif
19 changes: 19 additions & 0 deletions src/include/OVR_CowatchViewerUpdate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!

#ifndef OVR_COWATCHVIEWERUPDATE_H
#define OVR_COWATCHVIEWERUPDATE_H

#include "OVR_Platform_Defs.h"
#include "OVR_CowatchViewerArray.h"
#include "OVR_Types.h"

typedef struct ovrCowatchViewerUpdate *ovrCowatchViewerUpdateHandle;

/// List of viewer data of all cowatch participants.
OVRP_PUBLIC_FUNCTION(ovrCowatchViewerArrayHandle) ovr_CowatchViewerUpdate_GetDataList(const ovrCowatchViewerUpdateHandle obj);

/// User ID of the user with updated viewer data.
OVRP_PUBLIC_FUNCTION(ovrID) ovr_CowatchViewerUpdate_GetId(const ovrCowatchViewerUpdateHandle obj);


#endif
15 changes: 15 additions & 0 deletions src/include/OVR_CowatchingState.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!

#ifndef OVR_COWATCHINGSTATE_H
#define OVR_COWATCHINGSTATE_H

#include "OVR_Platform_Defs.h"
#include <stdbool.h>

typedef struct ovrCowatchingState *ovrCowatchingStateHandle;

/// Indicates if the current user is in a cowatching session.
OVRP_PUBLIC_FUNCTION(bool) ovr_CowatchingState_GetInSession(const ovrCowatchingStateHandle obj);


#endif
10 changes: 10 additions & 0 deletions src/include/OVR_LaunchType.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@

typedef enum ovrLaunchType_ {
ovrLaunchType_Unknown,
/// Normal launch from the user's library
ovrLaunchType_Normal,
/// Launch from the user accepting an invite. Check
/// ovr_LaunchDetails_GetLobbySessionID(),
/// ovr_LaunchDetails_GetMatchSessionID(),
/// ovr_LaunchDetails_GetDestinationApiName() and
/// ovr_LaunchDetails_GetDeeplinkMessage().
ovrLaunchType_Invite,
/// DEPRECATED
ovrLaunchType_Coordinated,
/// Launched from ovr_Application_LaunchOtherApp(). Check
/// ovr_LaunchDetails_GetLaunchSource() and
/// ovr_LaunchDetails_GetDeeplinkMessage().
ovrLaunchType_Deeplink,
} ovrLaunchType;

Expand Down
6 changes: 6 additions & 0 deletions src/include/OVR_Message.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
#include "OVR_Challenge.h"
#include "OVR_ChallengeArray.h"
#include "OVR_ChallengeEntryArray.h"
#include "OVR_CowatchingState.h"
#include "OVR_CowatchViewerArray.h"
#include "OVR_CowatchViewerUpdate.h"
#include "OVR_DataStore.h"
#include "OVR_DestinationArray.h"
#include "OVR_Error.h"
Expand Down Expand Up @@ -96,6 +99,9 @@ OVRP_PUBLIC_FUNCTION(ovrBlockedUserArrayHandle) ovr_Message_Ge
OVRP_PUBLIC_FUNCTION(ovrChallengeHandle) ovr_Message_GetChallenge(const ovrMessageHandle obj);
OVRP_PUBLIC_FUNCTION(ovrChallengeArrayHandle) ovr_Message_GetChallengeArray(const ovrMessageHandle obj);
OVRP_PUBLIC_FUNCTION(ovrChallengeEntryArrayHandle) ovr_Message_GetChallengeEntryArray(const ovrMessageHandle obj);
OVRP_PUBLIC_FUNCTION(ovrCowatchViewerArrayHandle) ovr_Message_GetCowatchViewerArray(const ovrMessageHandle obj);
OVRP_PUBLIC_FUNCTION(ovrCowatchViewerUpdateHandle) ovr_Message_GetCowatchViewerUpdate(const ovrMessageHandle obj);
OVRP_PUBLIC_FUNCTION(ovrCowatchingStateHandle) ovr_Message_GetCowatchingState(const ovrMessageHandle obj);
OVRP_PUBLIC_FUNCTION(ovrDataStoreHandle) ovr_Message_GetDataStore(const ovrMessageHandle obj);
OVRP_PUBLIC_FUNCTION(ovrDestinationArrayHandle) ovr_Message_GetDestinationArray(const ovrMessageHandle obj);
OVRP_PUBLIC_FUNCTION(ovrErrorHandle) ovr_Message_GetError(const ovrMessageHandle obj);
Expand Down
70 changes: 62 additions & 8 deletions src/include/OVR_MessageType.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ typedef enum ovrMessageType_ {
ovrMessage_Challenges_Join = 0x21248069, ///< Generated in response to ovr_Challenges_Join()
ovrMessage_Challenges_Leave = 0x296116E5, ///< Generated in response to ovr_Challenges_Leave()
ovrMessage_Challenges_UpdateInfo = 0x1175BE60, ///< Generated in response to ovr_Challenges_UpdateInfo()
ovrMessage_Cowatching_GetNextCowatchViewerArrayPage = 0x1D403932, ///< Generated in response to ovr_Cowatching_GetNextCowatchViewerArrayPage()
ovrMessage_Cowatching_GetPresenterData = 0x49864735, ///< Generated in response to ovr_Cowatching_GetPresenterData()
ovrMessage_Cowatching_GetViewersData = 0x5CD7A24F, ///< Generated in response to ovr_Cowatching_GetViewersData()
ovrMessage_Cowatching_IsInSession = 0x651B4884, ///< Generated in response to ovr_Cowatching_IsInSession()
ovrMessage_Cowatching_JoinSession = 0x6388A554, ///< Generated in response to ovr_Cowatching_JoinSession()
ovrMessage_Cowatching_LaunchInviteDialog = 0x22933297, ///< Generated in response to ovr_Cowatching_LaunchInviteDialog()
ovrMessage_Cowatching_LeaveSession = 0x3C9E46CD, ///< Generated in response to ovr_Cowatching_LeaveSession()
ovrMessage_Cowatching_RequestToPresent = 0x7F79BCAA, ///< Generated in response to ovr_Cowatching_RequestToPresent()
ovrMessage_Cowatching_ResignFromPresenting = 0x4B49C202, ///< Generated in response to ovr_Cowatching_ResignFromPresenting()
ovrMessage_Cowatching_SetPresenterData = 0x6D1C8906, ///< Generated in response to ovr_Cowatching_SetPresenterData()
ovrMessage_Cowatching_SetViewerData = 0x3CDBE826, ///< Generated in response to ovr_Cowatching_SetViewerData()
ovrMessage_DeviceApplicationIntegrity_GetIntegrityToken = 0x3271ABDA, ///< Generated in response to ovr_DeviceApplicationIntegrity_GetIntegrityToken()
ovrMessage_Entitlement_GetIsViewerEntitled = 0x186B58B1, ///< Generated in response to ovr_Entitlement_GetIsViewerEntitled()
ovrMessage_GroupPresence_Clear = 0x6DAA9CC3, ///< Generated in response to ovr_GroupPresence_Clear()
Expand Down Expand Up @@ -104,14 +115,6 @@ typedef enum ovrMessageType_ {
ovrMessage_RichPresence_Set = 0x3C147509, ///< Generated in response to ovr_RichPresence_Set()
ovrMessage_UserAgeCategory_Get = 0x21CBE0C0, ///< Generated in response to ovr_UserAgeCategory_Get()
ovrMessage_UserAgeCategory_Report = 0x2E4DD8D6, ///< Generated in response to ovr_UserAgeCategory_Report()
ovrMessage_UserDataStore_PrivateDeleteEntryByKey = 0x5C896F3E, ///< Generated in response to ovr_UserDataStore_PrivateDeleteEntryByKey()
ovrMessage_UserDataStore_PrivateGetEntries = 0x6C8A8228, ///< Generated in response to ovr_UserDataStore_PrivateGetEntries()
ovrMessage_UserDataStore_PrivateGetEntryByKey = 0x1C068319, ///< Generated in response to ovr_UserDataStore_PrivateGetEntryByKey()
ovrMessage_UserDataStore_PrivateWriteEntry = 0x41D2828B, ///< Generated in response to ovr_UserDataStore_PrivateWriteEntry()
ovrMessage_UserDataStore_PublicDeleteEntryByKey = 0x1DD5E5FB, ///< Generated in response to ovr_UserDataStore_PublicDeleteEntryByKey()
ovrMessage_UserDataStore_PublicGetEntries = 0x167D4BC2, ///< Generated in response to ovr_UserDataStore_PublicGetEntries()
ovrMessage_UserDataStore_PublicGetEntryByKey = 0x195C66C6, ///< Generated in response to ovr_UserDataStore_PublicGetEntryByKey()
ovrMessage_UserDataStore_PublicWriteEntry = 0x34364A0A, ///< Generated in response to ovr_UserDataStore_PublicWriteEntry()
ovrMessage_User_Get = 0x6BCF9E47, ///< Generated in response to ovr_User_Get()
ovrMessage_User_GetAccessToken = 0x06A85ABE, ///< Generated in response to ovr_User_GetAccessToken()
ovrMessage_User_GetBlockedUsers = 0x7D201556, ///< Generated in response to ovr_User_GetBlockedUsers()
Expand Down Expand Up @@ -151,6 +154,57 @@ typedef enum ovrMessageType_ {
/// Extract the payload from the message handle with ::ovr_Message_GetAssetFileDownloadUpdate().
ovrMessage_Notification_AssetFile_DownloadUpdate = 0x2FDD0CCD,

/// Sent when user is no longer copresent. Cowatching actions should not be
/// performed.
///
/// The message will contain a payload of type const char *.
/// Extract the payload from the message handle with ::ovr_Message_GetString().
ovrMessage_Notification_Cowatching_ApiNotReady = 0x66093981,

/// Sent when user is in copresent and cowatching is ready to go.
///
/// The message will contain a payload of type const char *.
/// Extract the payload from the message handle with ::ovr_Message_GetString().
ovrMessage_Notification_Cowatching_ApiReady = 0x09956693,

/// Sent when the current user joins/leaves the cowatching session.
///
/// The message will contain a payload of type ::ovrCowatchingStateHandle.
/// Extract the payload from the message handle with ::ovr_Message_GetCowatchingState().
ovrMessage_Notification_Cowatching_InSessionChanged = 0x0DF93113,

/// Sent when cowatching api has been initialized. The api is not yet ready at
/// this stage.
///
/// The message will contain a payload of type const char *.
/// Extract the payload from the message handle with ::ovr_Message_GetString().
ovrMessage_Notification_Cowatching_Initialized = 0x74D948F3,

/// Sent when the presenter updates the presenter data.
///
/// The message will contain a payload of type const char *.
/// Extract the payload from the message handle with ::ovr_Message_GetString().
ovrMessage_Notification_Cowatching_PresenterDataChanged = 0x4E078EEE,

/// Sent when a user has started a cowatching session whose id is reflected in
/// the payload.
///
/// The message will contain a payload of type const char *.
/// Extract the payload from the message handle with ::ovr_Message_GetString().
ovrMessage_Notification_Cowatching_SessionStarted = 0x7321939C,

/// Sent when a cowatching session has ended.
///
/// The message will contain a payload of type const char *.
/// Extract the payload from the message handle with ::ovr_Message_GetString().
ovrMessage_Notification_Cowatching_SessionStopped = 0x49E6DBFA,

/// Sent when a user joins or updates their viewer data.
///
/// The message will contain a payload of type ::ovrCowatchViewerUpdateHandle.
/// Extract the payload from the message handle with ::ovr_Message_GetCowatchViewerUpdate().
ovrMessage_Notification_Cowatching_ViewersDataChanged = 0x68F2F1FF,

/// Sent when the user is finished using the invite panel to send out
/// invitations. Contains a list of invitees.
///
Expand Down
Loading
Loading