Browse Source

[xbox] Initialize the video system and specify search path

pull/4917/merge
Anders Jenbo 4 years ago committed by Gleb Mazovetskiy
parent
commit
c7f19336c9
  1. 2
      Source/init.cpp
  2. 16
      Source/utils/display.cpp

2
Source/init.cpp

@ -95,6 +95,8 @@ std::vector<std::string> GetMPQSearchPaths()
paths.emplace_back("/usr/local/share/diasurgical/devilutionx/");
#elif defined(__3DS__) || defined(__SWITCH__)
paths.emplace_back("romfs:/");
#elif defined(NXDK)
paths.emplace_back("D:\\");
#elif (defined(_WIN64) || defined(_WIN32)) && !defined(__UWP__) && !defined(NXDK)
char gogpath[_FSG_PATH_MAX];
fsg_get_gog_game_path(gogpath, "1412601690");

16
Source/utils/display.cpp

@ -10,6 +10,10 @@
#include "platform/ctr/display.hpp"
#endif
#ifdef NXDK
#include <hal/video.h>
#endif
#include "DiabloUI/diabloui.h"
#include "control.h"
#include "controls/controller.h"
@ -235,6 +239,18 @@ bool SpawnWindow(const char *lpWindowName)
#ifdef __vita__
scePowerSetArmClockFrequency(444);
#endif
#ifdef NXDK
{
Size windowSize = *sgOptions.Graphics.resolution;
VIDEO_MODE xmode;
void *p = nullptr;
while (XVideoListModes(&xmode, 0, 0, &p)) {
if (windowSize.width >= xmode.width && windowSize.height == xmode.height)
break;
}
XVideoSetMode(xmode.width, xmode.height, xmode.bpp, xmode.refresh);
}
#endif
#if SDL_VERSION_ATLEAST(2, 0, 6) && defined(__vita__)
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");

Loading…
Cancel
Save