X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e93d59553cb4590af25ab23eea111e5113b7440..198be845897a79ba350ae7f93db536ddb2eccfb2:/src/msw/display.cpp diff --git a/src/msw/display.cpp b/src/msw/display.cpp index 37c98d45a7..f5e9e84d51 100644 --- a/src/msw/display.cpp +++ b/src/msw/display.cpp @@ -482,7 +482,9 @@ wxVideoMode wxDisplayImplWin32Base::GetCurrentMode() const // according to MSDN. The version of GetName() we implement for Win95 // returns an empty string. const wxString name = GetName(); - const wxChar * const deviceName = name.empty() ? NULL : name.c_str(); + const wxChar * const deviceName = name.empty() + ? (const wxChar*)NULL + : (const wxChar*)name.c_str(); DEVMODE dm; dm.dmSize = sizeof(dm); @@ -669,7 +671,9 @@ wxDisplayImplMultimon::GetModes(const wxVideoMode& modeMatch) const // according to MSDN. The version of GetName() we implement for Win95 // returns an empty string. const wxString name = GetName(); - const wxChar * const deviceName = name.empty() ? NULL : name.c_str(); + const wxChar * const deviceName = name.empty() + ? (const wxChar*)NULL + : (const wxChar*)name.c_str(); DEVMODE dm; dm.dmSize = sizeof(dm); @@ -764,11 +768,11 @@ bool wxDisplayImplMultimon::ChangeMode(const wxVideoMode& mode) // do change the mode switch ( pfnChangeDisplaySettingsEx ( - GetName(), // display name - pDevMode, // dev mode or NULL to reset - NULL, // reserved + GetName().wx_str(), // display name + pDevMode, // dev mode or NULL to reset + NULL, // reserved flags, - NULL // pointer to video parameters (not used) + NULL // pointer to video parameters (not used) ) ) { case DISP_CHANGE_SUCCESSFUL: