43 #include "render/graphics.h"
74 #ifdef __native_client__
79 PRAGMA48(GCC diagnostic ignored
"-Wshadow")
82 #include <SDL_screenkeyboard.h>
89 #include <SDL_framerate.h>
92 #include <SDL_image.h>
95 #include <SDL_syswm.h>
167 nullptr,
nullptr,
true);
216 "Please wait - VIDEO MODE TEST - %s %s - Please wait",
269 const int actualHeight,
279 #ifdef __native_client__
280 naclPostMessage(
"resize-window",
281 strprintf(
"%d,%d", actualWidth, actualHeight));
294 actualWidth = std::max(470, actualWidth);
295 actualHeight = std::max(320, actualHeight);
336 #ifdef __native_client__
337 naclPostMessage(
"set-fullscreen",
366 if (val > 0 && val < 2)
413 #if !defined(ANDROID) && !defined(__SWITCH__)
416 iconFile.append(
".ico");
419 iconFile.append(
".png");
423 logger->
log(
"Loading icon from file: %s", iconFile.c_str());
426 static SDL_SysWMinfo pInfo;
432 HICON icon =
static_cast<HICON
>(LoadImage(
nullptr,
441 icon = LoadIcon(GetModuleHandle(
nullptr),
"A");
446 SetClassLongPtr(pInfo.window,
448 reinterpret_cast<LONG_PTR
>(icon));
450 SetClassLong(pInfo.window,
452 reinterpret_cast<LONG
>(icon));
458 if (
mIcon !=
nullptr)
461 SDL_SetSurfaceAlphaMod(
mIcon, SDL_ALPHA_OPAQUE);
464 SDL_SetAlpha(
mIcon, SDL_SRCALPHA, SDL_ALPHA_OPAQUE);
476 return SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE;
int SDL_getFramerate(FPSmanager *manager)
Return the current target framerate in Hz.
int SDL_setFramerate(FPSmanager *manager, Uint32 rate)
Set the framerate in Hz.
void setAllowHighlight(const bool n)
void setVisible(Visible visible)
void moveButtons(const int width)
std::string getValue(const std::string &key, const std::string &deflt) const
bool getBoolValue(const std::string &key) const
std::string getStringValue(const std::string &key) const
float getFloatValue(const std::string &key) const
void setValue(const std::string &key, const std::string &value)
int getIntValue(const std::string &key) const
static void videoResized(const int width, const int height)
virtual bool resizeScreen(const int width, const int height)
bool setFullscreen(const bool fs)
SDL_Surface * getWindow() const
void videoResized() const
void log(const char *const log_text,...)
std::string windowCaption
void resize(const int width, const int height)
virtual void scheduleDelete()
#define MSDL_FreeSurface(surface)
DebugWindow * debugWindow
DidYouKnowWindow * didYouKnowWindow
EquipmentWindow * beingEquipmentWindow
void SetWindowTitle(const SDL_Surface *const window, const char *const title)
bool getWindowWMInfo(const SDL_Surface *const window, SDL_SysWMinfo *const info)
void SetWindowIcon(const SDL_Surface *const window, SDL_Surface *const icon)
void grabInput(const SDL_Surface *const window, const bool grab)
void setGamma(const SDL_Surface *const window, const float gamma)
void setVsync(const int val)
std::string getPath(const std::string &file)
bool setFullScreen(const bool fs)
void setFramerate(const unsigned int fpsLimit)
void deleteValidateWindows()
void updateScreenKeyboard(const int height)
void setIsMinimized(const bool n)
void createValidateWindows()
void doResizeVideo(const int actualWidth, const int actualHeight, const bool always)
void resizeVideo(int actualWidth, int actualHeight, const bool always)
bool mNewMessageFlag(false)
QuestsWindow * questsWindow
SetupWindow * setupWindow
SkillDialog * skillDialog
SpellManager * spellManager
SpellShortcut * spellShortcut
std::string strprintf(const char *const format,...)
Structure holding the state and timing information of the framerate controller.
TouchManager touchManager
UserPalette * userPalette