Cleaned interface
And fixed some VS warnings Former-commit-id: 8c89fa1d4dc92a362053e4cdeabe20537fcec2a6
This commit is contained in:
@@ -60,11 +60,6 @@ namespace
|
||||
{"Vortex86 SoC", nzProcessorVendor_VIA}
|
||||
};
|
||||
|
||||
bool VendorStringCompare(const VendorString& a, const VendorString& b)
|
||||
{
|
||||
return std::memcmp(a.vendor, b.vendor, 12);
|
||||
}
|
||||
|
||||
nzProcessorVendor s_vendorEnum = nzProcessorVendor_Unknown;
|
||||
bool s_capabilities[nzProcessorCap_Max+1] = {false};
|
||||
bool s_initialized = false;
|
||||
|
||||
@@ -35,7 +35,7 @@ nzUInt64 NzMemoryStream::GetSize() const
|
||||
|
||||
std::size_t NzMemoryStream::Read(void* buffer, std::size_t size)
|
||||
{
|
||||
unsigned int readSize = std::min(static_cast<nzUInt64>(size), m_size-m_pos);
|
||||
unsigned int readSize = std::min(static_cast<unsigned int>(size), static_cast<unsigned int>(m_size-m_pos));
|
||||
std::memcpy(buffer, &m_ptr[m_pos], readSize);
|
||||
m_pos += readSize;
|
||||
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user