Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro
Commits
8fa62e29
Commit
8fa62e29
authored
May 26, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add better logs
parent
c6e89bec
Pipeline
#36868
passed with stages
in 6 minutes and 45 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
gframe/game.cpp
gframe/game.cpp
+5
-0
gframe/game.h
gframe/game.h
+1
-0
gframe/sound_manager.cpp
gframe/sound_manager.cpp
+7
-3
No files found.
gframe/game.cpp
View file @
8fa62e29
...
...
@@ -2006,6 +2006,11 @@ void Game::ErrorLog(const char* msg) {
std
::
fprintf
(
fp
,
"[%s]%s
\n
"
,
timebuf
,
msg
);
std
::
fclose
(
fp
);
}
void
Game
::
ErrorLog
(
const
wchar_t
*
msg
)
{
char
msgbuf
[
2048
];
BufferIO
::
EncodeUTF8
(
msg
,
msgbuf
);
ErrorLog
(
msgbuf
);
}
void
Game
::
initUtils
()
{
//user files
FileSystem
::
MakeDir
(
"replay"
);
...
...
gframe/game.h
View file @
8fa62e29
...
...
@@ -218,6 +218,7 @@ public:
void
ClearChatMsg
();
void
AddDebugMsg
(
const
char
*
msgbuf
);
void
ErrorLog
(
const
char
*
msgbuf
);
void
ErrorLog
(
const
wchar_t
*
msgbuf
);
void
initUtils
();
void
ClearTextures
();
void
CloseGameButtons
();
...
...
gframe/sound_manager.cpp
View file @
8fa62e29
...
...
@@ -111,11 +111,15 @@ void SoundManager::PlaySound(wchar_t* sound) {
usingSoundEffectPointer
=
playingSoundEffect
[
0
];
ma_sound_uninit
(
usingSoundEffectPointer
);
}
wprintf
(
L"Playing sound: %ls
\n
"
,
sound
);
wchar_t
textbuf
[
1024
];
myswprintf
(
textbuf
,
L"Playing sound: %ls"
,
sound
);
mainGame
->
ErrorLog
(
textbuf
);
auto
res
=
ma_sound_init_from_file_w
(
&
engineSound
,
sound
,
MA_SOUND_FLAG_ASYNC
|
MA_SOUND_FLAG_STREAM
,
nullptr
,
nullptr
,
usingSoundEffectPointer
);
wprintf
(
L"ma_sound_init_from_file_w result: %d
\n
"
,
res
);
myswprintf
(
textbuf
,
L"ma_sound_init_from_file_w result: %d"
,
res
);
mainGame
->
ErrorLog
(
textbuf
);
auto
res2
=
ma_sound_start
(
usingSoundEffectPointer
);
wprintf
(
L"ma_sound_start result: %d
\n
"
,
res2
);
myswprintf
(
textbuf
,
L"ma_sound_start result: %d"
,
res2
);
mainGame
->
ErrorLog
(
textbuf
);
#endif
#ifdef YGOPRO_USE_IRRKLANG
char
csound
[
1024
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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