mirror of https://github.com/odrling/Aegisub
Use wxGetApp() rather than wxTheApp plus a cast
Originally committed to SVN as r6052.
This commit is contained in:
parent
92949bc965
commit
28e8f0b640
|
@ -78,8 +78,7 @@ void DirectSoundPlayer::OpenStream() {
|
|||
if (FAILED(res)) throw "Failed initializing DirectSound";
|
||||
|
||||
// Set DirectSound parameters
|
||||
AegisubApp *app = (AegisubApp*) wxTheApp;
|
||||
directSound->SetCooperativeLevel((HWND)app->frame->GetHandle(),DSSCL_PRIORITY);
|
||||
directSound->SetCooperativeLevel((HWND)wxGetApp().frame->GetHandle(),DSSCL_PRIORITY);
|
||||
|
||||
// Create the wave format structure
|
||||
WAVEFORMATEX waveFormat;
|
||||
|
|
|
@ -165,9 +165,8 @@ struct app_language : public Command {
|
|||
|
||||
void operator()(agi::Context *c) {
|
||||
// Get language
|
||||
AegisubApp *app = (AegisubApp*) wxTheApp;
|
||||
int old = app->locale.curCode;
|
||||
int newCode = app->locale.PickLanguage();
|
||||
int old = wxGetApp().locale.curCode;
|
||||
int newCode = wxGetApp().locale.PickLanguage();
|
||||
// Is OK?
|
||||
if (newCode != -1 && newCode != old) {
|
||||
// Set code
|
||||
|
|
Loading…
Reference in New Issue