mirror of
https://github.com/glfw/glfw.git
synced 2025-01-30 11:52:35 +00:00
Returns the audio_app without a window
This commit is contained in:
parent
de06756d4d
commit
09efa97ef5
@ -660,9 +660,21 @@ GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_ANDROID)
|
||||
/*! @brief Returns the `struct android_app` of the specified window.
|
||||
/*! @brief Returns the `struct android_app` of the current application.
|
||||
*
|
||||
* @return The `struct android_app` of the current, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.5.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI struct android_app* glfwGetAndroidApp(GLFWwindow* window);
|
||||
GLFWAPI struct android_app* glfwGetAndroidApp(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -131,4 +131,4 @@ void _glfwGetRequiredInstanceExtensionsAndroid(char** extensions);
|
||||
GLFWbool _glfwGetPhysicalDevicePresentationSupportAndroid(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);
|
||||
VkResult _glfwCreateWindowSurfaceAndroid(VkInstance instance, _GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
|
||||
|
||||
GLFWAPI struct android_app* glfwGetAndroidApp(GLFWwindow* handle);
|
||||
GLFWAPI struct android_app* glfwGetAndroidApp(void);
|
||||
|
@ -555,9 +555,8 @@ VkResult _glfwCreateWindowSurfaceAndroid(VkInstance instance,
|
||||
////// GLFW native API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
GLFWAPI struct android_app* glfwGetAndroidApp(GLFWwindow* handle)
|
||||
GLFWAPI struct android_app* glfwGetAndroidApp(void)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*)handle;
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
||||
return window->android;
|
||||
return _glfw.gstate.app;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user