mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 05:36:35 +00:00
vivante fullscreen support added
This commit is contained in:
parent
c0ca50a434
commit
c6a29ade17
@ -27,6 +27,15 @@
|
|||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
|
void _glfwInitFbMonitor(void)
|
||||||
|
{
|
||||||
|
int width, height;
|
||||||
|
fbGetDisplayGeometry(_glfw.vivante.display, &width, &height);
|
||||||
|
|
||||||
|
_glfwInputMonitor(_glfwAllocMonitor("Display", width, height),
|
||||||
|
GLFW_CONNECTED,
|
||||||
|
_GLFW_INSERT_FIRST);
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
////// GLFW platform API //////
|
////// GLFW platform API //////
|
||||||
@ -91,11 +100,13 @@ int _glfwPlatformInit(void)
|
|||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
_glfwInitTimerPOSIX();
|
|
||||||
|
|
||||||
if (!_glfwInitJoysticksLinux())
|
if (!_glfwInitJoysticksLinux())
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|
||||||
|
_glfwInitTimerPOSIX();
|
||||||
|
|
||||||
|
_glfwInitFbMonitor();
|
||||||
|
|
||||||
return GLFW_TRUE;
|
return GLFW_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,14 @@ static int queryWindowGeometry(_GLFWwindow* window )
|
|||||||
static int createNativeWindow(_GLFWwindow* window,
|
static int createNativeWindow(_GLFWwindow* window,
|
||||||
const _GLFWwndconfig* wndconfig)
|
const _GLFWwndconfig* wndconfig)
|
||||||
{
|
{
|
||||||
window->vivante.native_window = fbCreateWindow(_GLFW_EGL_NATIVE_DISPLAY, 0, 0, 0, 0);//, wndconfig->width, wndconfig->height);
|
int width = wndconfig->width;
|
||||||
|
int height = wndconfig->height;
|
||||||
|
if (window->monitor)
|
||||||
|
{
|
||||||
|
width = window->monitor->widthMM;
|
||||||
|
height = window->monitor->heightMM;
|
||||||
|
}
|
||||||
|
window->vivante.native_window = fbCreateWindow(_GLFW_EGL_NATIVE_DISPLAY, 0, 0, width, height);
|
||||||
if (!window->vivante.native_window)
|
if (!window->vivante.native_window)
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|
||||||
@ -115,6 +122,10 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
|
|||||||
|
|
||||||
void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
|
void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
|
||||||
{
|
{
|
||||||
|
if (xpos)
|
||||||
|
*xpos = window->vivante.xpos;
|
||||||
|
if (ypos)
|
||||||
|
*ypos = window->vivante.ypos;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)
|
void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)
|
||||||
@ -155,6 +166,14 @@ void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
|
|||||||
int* left, int* top,
|
int* left, int* top,
|
||||||
int* right, int* bottom)
|
int* right, int* bottom)
|
||||||
{
|
{
|
||||||
|
if (left)
|
||||||
|
*left = 0;
|
||||||
|
if (top)
|
||||||
|
*top = 0;
|
||||||
|
if (right)
|
||||||
|
*right = 0;
|
||||||
|
if (bottom)
|
||||||
|
*bottom = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,
|
void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,
|
||||||
|
Loading…
Reference in New Issue
Block a user