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) PCMAudioProvider::PCMAudioProvider(const wxString &filename)
{ {
#ifdef _WINDOWS #ifdef _WIN32
file_handle = CreateFile( file_handle = CreateFile(
filename.c_str(), filename.c_str(),
FILE_READ_DATA, FILE_READ_DATA,
@ -123,7 +123,7 @@ PCMAudioProvider::PCMAudioProvider(const wxString &filename)
/// ///
PCMAudioProvider::~PCMAudioProvider() PCMAudioProvider::~PCMAudioProvider()
{ {
#ifdef _WINDOWS #ifdef _WIN32
if (current_mapping) { if (current_mapping) {
UnmapViewOfFile(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) { 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 // It's not visible, change the current mapping
if (current_mapping) { if (current_mapping) {
#ifdef _WINDOWS #ifdef _WIN32
UnmapViewOfFile(current_mapping); UnmapViewOfFile(current_mapping);
#else #else
munmap(current_mapping, mapping_length); 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 // 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 // Hopefully this should ensure that small files are always mapped in their entirety
#ifdef _WINDOWS #ifdef _WIN32
LARGE_INTEGER mapping_start_li; LARGE_INTEGER mapping_start_li;
mapping_start_li.QuadPart = mapping_start; mapping_start_li.QuadPart = mapping_start;
current_mapping = MapViewOfFile( current_mapping = MapViewOfFile(

View File

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

View File

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