Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
8fba0439
"cockatrice/git@gitlab.completext.com:quzar/Cockatrice.git" did not exist on "ff20e04842937a84369dda69298101e9c9e53a46"
Commit
8fba0439
authored
May 14, 2015
by
Fabio Bas
Browse files
All platform: at startup, ensure that a proper directory for sounds is set
parent
924337ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/main.cpp
View file @
8fba0439
...
@@ -165,6 +165,20 @@ int main(int argc, char *argv[])
...
@@ -165,6 +165,20 @@ int main(int argc, char *argv[])
if
(
!
QDir
().
mkpath
(
settingsCache
->
getPicsPath
()
+
"/CUSTOM"
))
if
(
!
QDir
().
mkpath
(
settingsCache
->
getPicsPath
()
+
"/CUSTOM"
))
qDebug
()
<<
"Could not create "
+
settingsCache
->
getPicsPath
().
toUtf8
()
+
"/CUSTOM. Will fall back on default card images."
;
qDebug
()
<<
"Could not create "
+
settingsCache
->
getPicsPath
().
toUtf8
()
+
"/CUSTOM. Will fall back on default card images."
;
if
(
settingsCache
->
getSoundPath
().
isEmpty
()
||
!
QDir
(
settingsCache
->
getSoundPath
()).
exists
())
{
QDir
tmpDir
;
#ifdef Q_OS_MAC
tmpDir
=
app
.
applicationDirPath
()
+
"/../Resources/sounds"
;
#elif defined(Q_OS_WIN)
tmpDir
=
app
.
applicationDirPath
()
+
"/sounds"
;
#else // linux
tmpDir
=
app
.
applicationDirPath
()
+
"/../share/cockatrice/sounds/"
;
#endif
settingsCache
->
setSoundPath
(
tmpDir
.
canonicalPath
());
}
if
(
!
settingsValid
()
||
db
->
getLoadStatus
()
!=
Ok
)
{
if
(
!
settingsValid
()
||
db
->
getLoadStatus
()
!=
Ok
)
{
qDebug
(
"main(): invalid settings or load status"
);
qDebug
(
"main(): invalid settings or load status"
);
DlgSettings
dlgSettings
;
DlgSettings
dlgSettings
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment