mirror of https://github.com/odrling/Aegisub
Hopeful fix for splash screen
Originally committed to SVN as r675.
This commit is contained in:
parent
17d2ba4f1d
commit
af78223810
|
@ -56,11 +56,16 @@ SplashScreen::SplashScreen(wxWindow *parent)
|
|||
|
||||
#if wxUSE_DISPLAY == 1
|
||||
// Center on current display
|
||||
wxDisplay display(wxDisplay::GetFromPoint(parent->GetScreenPosition()));
|
||||
if (wxDisplay::GetCount() < 1) CentreOnParent();
|
||||
else {
|
||||
int point = wxDisplay::GetFromPoint(parent->GetScreenPosition());
|
||||
if (point == wxNOT_FOUND) point = 0;
|
||||
wxDisplay display(point);
|
||||
wxRect dr = display.GetGeometry();
|
||||
wxRect window = GetScreenRect();
|
||||
window = window.CenterIn(dr);
|
||||
Move(window.GetLeft(),window.GetTop());
|
||||
}
|
||||
#else
|
||||
// Center on window
|
||||
CentreOnParent();
|
||||
|
|
Loading…
Reference in New Issue