vivante fullscreen support added

This commit is contained in:
Krylov Yaroslav 2019-05-30 12:58:32 +03:00
parent c0ca50a434
commit c6a29ade17
2 changed files with 33 additions and 3 deletions

View File

@ -27,6 +27,15 @@
#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 //////
@ -91,11 +100,13 @@ int _glfwPlatformInit(void)
return GLFW_FALSE;
}
_glfwInitTimerPOSIX();
if (!_glfwInitJoysticksLinux())
return GLFW_FALSE;
_glfwInitTimerPOSIX();
_glfwInitFbMonitor();
return GLFW_TRUE;
}

View File

@ -42,7 +42,14 @@ static int queryWindowGeometry(_GLFWwindow* window )
static int createNativeWindow(_GLFWwindow* window,
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)
return GLFW_FALSE;
@ -115,6 +122,10 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
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)
@ -155,6 +166,14 @@ void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
int* left, int* top,
int* right, int* bottom)
{
if (left)
*left = 0;
if (top)
*top = 0;
if (right)
*right = 0;
if (bottom)
*bottom = 0;
}
void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,