mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-01 16:19:43 +02:00
Allow use of wxPowerResource if wxWidgets is 3.1.x (#474)
I got an error when compiling with wxWidgets 3.0.4, because wxPowerResource is undefined.
It seems to me that wxPowerResource has been introduced with wxWidgets 3.1.x branch:
51d715e46d (diff-93a9bace734a8065b203ebd2f670cbe8)
so, it would be worth to check if the feature is supported at compile time.
This commit is contained in:
parent
11bfccba53
commit
9eaa2f28f7
@ -1419,7 +1419,7 @@ bool AudioIO::StartPortAudioStream(const AudioIOStartStreamOptions &options,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__WXMAC__) || defined(__WXMSW__)
|
||||
#if (defined(__WXMAC__) || defined(__WXMSW__)) && wxCHECK_VERSION(3,1,0)
|
||||
// Don't want the system to sleep while audio I/O is active
|
||||
if (mPortStreamV19 != NULL && mLastPaError == paNoError) {
|
||||
wxPowerResource::Acquire(wxPOWER_RESOURCE_SCREEN, _("Audacity Audio"));
|
||||
@ -2172,7 +2172,7 @@ void AudioIO::StopStream()
|
||||
)
|
||||
return;
|
||||
|
||||
#if defined(__WXMAC__) || defined(__WXMSW__)
|
||||
#if (defined(__WXMAC__) || defined(__WXMSW__)) && wxCHECK_VERSION(3,1,0)
|
||||
// Re-enable system sleep
|
||||
wxPowerResource::Release(wxPOWER_RESOURCE_SCREEN);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user