Switch _WINDOWS for _WIN32, as _WINDOWS doesn't seem to be defined using MSVC 2010 headers. On the other hand, _WIN32 is always defined by the compiler.

Originally committed to SVN as r4955.
This commit is contained in:
Niels Martin Hansen 2010-12-11 16:47:03 +00:00
parent d63a646c2a
commit 60b3ea15c3
3 changed files with 7 additions and 7 deletions

View file

@ -64,7 +64,7 @@
///
PCMAudioProvider::PCMAudioProvider(const wxString &filename)
{
#ifdef _WINDOWS
#ifdef _WIN32
file_handle = CreateFile(
filename.c_str(),
FILE_READ_DATA,
@ -123,7 +123,7 @@ PCMAudioProvider::PCMAudioProvider(const wxString &filename)
///
PCMAudioProvider::~PCMAudioProvider()
{
#ifdef _WINDOWS
#ifdef _WIN32
if (current_mapping) {
UnmapViewOfFile(current_mapping);
}
@ -154,7 +154,7 @@ char * PCMAudioProvider::EnsureRangeAccessible(int64_t range_start, int64_t rang
if (!current_mapping || range_start < mapping_start || range_start+range_length > mapping_start+(int64_t)mapping_length) {
// It's not visible, change the current mapping
if (current_mapping) {
#ifdef _WINDOWS
#ifdef _WIN32
UnmapViewOfFile(current_mapping);
#else
munmap(current_mapping, mapping_length);
@ -184,7 +184,7 @@ char * PCMAudioProvider::EnsureRangeAccessible(int64_t range_start, int64_t rang
// We already checked that the requested range doesn't extend over the end of the file
// Hopefully this should ensure that small files are always mapped in their entirety
#ifdef _WINDOWS
#ifdef _WIN32
LARGE_INTEGER mapping_start_li;
mapping_start_li.QuadPart = mapping_start;
current_mapping = MapViewOfFile(

View file

@ -41,7 +41,7 @@
#include <wx/thread.h>
#endif
#ifdef _WINDOWS
#ifdef _WIN32
#include <windows.h>
#endif
@ -55,7 +55,7 @@
/// DOCME
class PCMAudioProvider : public AudioProvider {
private:
#ifdef _WINDOWS
#ifdef _WIN32
/// DOCME
HANDLE file_handle;

View file

@ -149,7 +149,7 @@ FrameMain::FrameMain (wxArrayString args)
// Set icon
StartupLog(_T("Set icon"));
#ifdef _WINDOWS
#ifdef _WIN32
SetIcon(wxICON(wxicon));
#else
wxIcon icon;