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
50d5877f
Commit
50d5877f
authored
May 04, 2025
by
Chen Bill
Committed by
GitHub
May 04, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix DeckManager::SaveDeck (#2775)
parent
4da80f72
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+4
-4
gframe/deck_manager.h
gframe/deck_manager.h
+1
-1
No files found.
gframe/deck_manager.cpp
View file @
50d5877f
...
...
@@ -311,7 +311,7 @@ bool DeckManager::LoadCurrentDeck(int category_index, const wchar_t* category_na
mainGame
->
deckBuilder
.
RefreshPackListScroll
();
return
res
;
}
bool
DeckManager
::
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
file
)
{
bool
DeckManager
::
SaveDeck
(
const
Deck
&
deck
,
const
wchar_t
*
file
)
{
if
(
!
FileSystem
::
IsDirExists
(
L"./deck"
)
&&
!
FileSystem
::
MakeDir
(
L"./deck"
))
return
false
;
FILE
*
fp
=
OpenDeckFile
(
file
,
"w"
);
...
...
@@ -319,13 +319,13 @@ bool DeckManager::SaveDeck(Deck& deck, const wchar_t* file) {
return
false
;
std
::
fprintf
(
fp
,
"#created by ...
\n
#main
\n
"
);
for
(
size_t
i
=
0
;
i
<
deck
.
main
.
size
();
++
i
)
std
::
fprintf
(
fp
,
"%
d
\n
"
,
deck
.
main
[
i
]
->
first
);
std
::
fprintf
(
fp
,
"%
u
\n
"
,
deck
.
main
[
i
]
->
first
);
std
::
fprintf
(
fp
,
"#extra
\n
"
);
for
(
size_t
i
=
0
;
i
<
deck
.
extra
.
size
();
++
i
)
std
::
fprintf
(
fp
,
"%
d
\n
"
,
deck
.
extra
[
i
]
->
first
);
std
::
fprintf
(
fp
,
"%
u
\n
"
,
deck
.
extra
[
i
]
->
first
);
std
::
fprintf
(
fp
,
"!side
\n
"
);
for
(
size_t
i
=
0
;
i
<
deck
.
side
.
size
();
++
i
)
std
::
fprintf
(
fp
,
"%
d
\n
"
,
deck
.
side
[
i
]
->
first
);
std
::
fprintf
(
fp
,
"%
u
\n
"
,
deck
.
side
[
i
]
->
first
);
std
::
fclose
(
fp
);
return
true
;
}
...
...
gframe/deck_manager.h
View file @
50d5877f
...
...
@@ -58,7 +58,7 @@ public:
static
void
GetDeckFile
(
wchar_t
*
ret
,
int
category_index
,
const
wchar_t
*
category_name
,
const
wchar_t
*
deckname
);
static
FILE
*
OpenDeckFile
(
const
wchar_t
*
file
,
const
char
*
mode
);
static
irr
::
io
::
IReadFile
*
OpenDeckReader
(
const
wchar_t
*
file
);
static
bool
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
file
);
static
bool
SaveDeck
(
const
Deck
&
deck
,
const
wchar_t
*
file
);
static
bool
DeleteDeck
(
const
wchar_t
*
file
);
static
bool
CreateCategory
(
const
wchar_t
*
name
);
static
bool
RenameCategory
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
);
...
...
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