#include "fsCDisplay.h"
#include <raylib.h>
#include <fsCore/src/debug/fsAssert.h>
#include <fsCore/fsIHardware.h>
#include <fsCore/src/fsCAppSettings.h>
#include <fsAppCore/src/fsCAppCoreMain.h>
#include <fsAudio/fsIAudioManager.h>
fsBool fsCDisplay::displayTypeIsDesktopGet() const
{
return true;
}
fsPoint fsCDisplay::fixedDisplaySizeGet() const
{
return fsPoint(640, 480);
}
void fsCDisplay::desktopScreenModesEnumerateDo()
{
screenModeAdd(1366,768,32);
}
void fsCDisplay::buffersSwap()<--- Either there is a missing 'override', or the member function 'fsCDisplay::buffersSwap' can be static.
{
}
fsBool fsCDisplay::desktopScreenModeSetDo(const fsCDisplayMode* const pDisplayMode, fsBool pFullScreen)
{
openGLViewCreate(pDisplayMode, pFullScreen);
return true;
}
fsStr fsCDisplay::nameGet()
{
const fsCAppSettings* const settings = fsCAppCoreMain::instanceGet()->settingsGet();
fsStr name = settings->strGetWithDefault("installedName", "testApp");
if (settings->buildFlavourGet() == "CE")
{
name += " Collectors Edition";
}
return name;
}
void fsCDisplay::openGLViewCreate(const fsCDisplayMode* const pDisplayMode, fsBool pFullScreen)
{
SetWindowSize(pDisplayMode->widthGet(), pDisplayMode->heightGet());
SetWindowPosition(GetScreenWidth() / 2,GetScreenHeight() / 2);
}
void fsCDisplay::focusStatusHandle()<--- Either there is a missing 'override', or the member function 'fsCDisplay::focusStatusHandle' can be static.
{
}
void fsCDisplay::focus(GLFWwindow* pWindow, int pGotFocus)
{
}
void fsCDisplay::appImplSceneCreate()<--- Either there is a missing 'override', or the member function 'fsCDisplay::appImplSceneCreate' can be static.
{
}
fsCDisplay::fsCDisplay()
{
//TRACELOG(LOG_INFO, "Setting window size");
SetConfigFlags(FLAG_WINDOW_RESIZABLE | FLAG_WINDOW_HIGHDPI);
InitWindow(640, 480, nameGet().utf8Get());
}
fsCDisplay::~fsCDisplay()
{
CloseWindow();
}