Cleaned interface

And fixed some VS warnings


Former-commit-id: 8c89fa1d4dc92a362053e4cdeabe20537fcec2a6
This commit is contained in:
Lynix
2013-06-09 11:25:17 +02:00
parent 8460a96744
commit c76c419867
6 changed files with 18 additions and 22 deletions

View File

@@ -14,7 +14,7 @@ NzVideoMode NzVideoModeImpl::GetDesktopMode()
mode.dmSize = sizeof(DEVMODE);
EnumDisplaySettings(nullptr, ENUM_CURRENT_SETTINGS, &mode);
return NzVideoMode(mode.dmPelsWidth, mode.dmPelsHeight, mode.dmBitsPerPel);
return NzVideoMode(mode.dmPelsWidth, mode.dmPelsHeight, static_cast<nzUInt8>(mode.dmBitsPerPel));
}
void NzVideoModeImpl::GetFullscreenModes(std::vector<NzVideoMode>& modes)
@@ -23,7 +23,7 @@ void NzVideoModeImpl::GetFullscreenModes(std::vector<NzVideoMode>& modes)
win32Mode.dmSize = sizeof(DEVMODE);
for (unsigned int i = 0; EnumDisplaySettings(nullptr, i, &win32Mode); ++i)
{
NzVideoMode mode(win32Mode.dmPelsWidth, win32Mode.dmPelsHeight, win32Mode.dmBitsPerPel);
NzVideoMode mode(win32Mode.dmPelsWidth, win32Mode.dmPelsHeight, static_cast<nzUInt8>(win32Mode.dmBitsPerPel));
// Il existe plusieurs modes avec ces trois caractéristques identiques
if (std::find(modes.begin(), modes.end(), mode) == modes.end())