Merged default into minor

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2014-09-28 15:56:04 -03:00
26 changed files with 271 additions and 282 deletions
+5 -17
View File
@@ -497,29 +497,17 @@ std::vector<WindowSize> Window::getFullscreenSizes(int displayindex) const
{
std::vector<WindowSize> sizes;
SDL_DisplayMode mode = {};
std::vector<WindowSize>::const_iterator it;
for (int i = 0; i < SDL_GetNumDisplayModes(displayindex); i++)
{
SDL_DisplayMode mode = {};
SDL_GetDisplayMode(displayindex, i, &mode);
WindowSize w = {mode.w, mode.h};
// SDL2's display mode list has multiple entries for modes of the same
// size with different bits per pixel, so we need to filter those out.
bool alreadyhassize = false;
for (it = sizes.begin(); it != sizes.end(); ++it)
{
if (it->width == mode.w && it->height == mode.h)
{
alreadyhassize = true;
break;
}
}
if (!alreadyhassize)
{
WindowSize w = {mode.w, mode.h};
if (std::find(sizes.begin(), sizes.end(), w) == sizes.end())
sizes.push_back(w);
}
}
return sizes;
@@ -767,7 +755,7 @@ SDL_MessageBoxFlags Window::convertMessageBoxType(MessageBoxType type) const
}
}
bool Window::showMessageBox(MessageBoxType type, const std::string &title, const std::string &message, bool attachtowindow)
bool Window::showMessageBox(const std::string &title, const std::string &message, MessageBoxType type, bool attachtowindow)
{
SDL_MessageBoxFlags flags = convertMessageBoxType(type);
SDL_Window *sdlwindow = attachtowindow ? window : nullptr;
+1 -1
View File
@@ -92,7 +92,7 @@ public:
const void *getHandle() const;
bool showMessageBox(MessageBoxType type, const std::string &title, const std::string &message, bool attachtowindow);
bool showMessageBox(const std::string &title, const std::string &message, MessageBoxType type, bool attachtowindow);
int showMessageBox(const MessageBoxData &data);
static love::window::Window *createSingleton();