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
0
Merge Requests
0
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
30860cac
Commit
30860cac
authored
Jun 17, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix same name lflist and cdb
parent
3a19b04e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
gframe/data_manager.cpp
gframe/data_manager.cpp
+4
-1
gframe/data_manager.h
gframe/data_manager.h
+1
-0
gframe/game.cpp
gframe/game.cpp
+9
-6
No files found.
gframe/data_manager.cpp
View file @
30860cac
...
...
@@ -88,6 +88,9 @@ bool DataManager::LoadDB(const wchar_t* wfile) {
#else
auto
reader
=
FileSystem
->
createAndOpenFile
(
file
);
#endif
return
LoadDB
(
reader
);
}
bool
DataManager
::
LoadDB
(
irr
::
io
::
IReadFile
*
reader
)
{
if
(
reader
==
nullptr
)
return
false
;
spmemvfs_db_t
db
;
...
...
@@ -99,7 +102,7 @@ bool DataManager::LoadDB(const wchar_t* wfile) {
reader
->
drop
();
(
mem
->
data
)[
mem
->
total
]
=
'\0'
;
bool
ret
{};
if
(
spmemvfs_open_db
(
&
db
,
file
,
mem
)
!=
SQLITE_OK
)
if
(
spmemvfs_open_db
(
&
db
,
"temp.db"
,
mem
)
!=
SQLITE_OK
)
ret
=
Error
(
db
.
handle
);
else
ret
=
ReadDB
(
db
.
handle
);
...
...
gframe/data_manager.h
View file @
30860cac
...
...
@@ -45,6 +45,7 @@ public:
DataManager
();
bool
ReadDB
(
sqlite3
*
pDB
);
bool
LoadDB
(
const
wchar_t
*
wfile
);
bool
LoadDB
(
irr
::
io
::
IReadFile
*
reader
);
bool
LoadStrings
(
const
char
*
file
);
bool
LoadStrings
(
irr
::
io
::
IReadFile
*
reader
);
void
ReadStringConfLine
(
const
char
*
linebuf
);
...
...
gframe/game.cpp
View file @
30860cac
...
...
@@ -1270,16 +1270,19 @@ void Game::LoadExpansions(const wchar_t* expansions_path) {
const
char
*
uname
=
archive
->
getFullFileName
(
j
).
c_str
();
BufferIO
::
DecodeUTF8
(
uname
,
fname
);
#endif
auto
createReader
=
[
&
]()
{
#ifdef _WIN32
return
archiveObj
->
createAndOpenFile
(
fname
);
#else
return
archiveObj
->
createAndOpenFile
(
uname
);
#endif
};
if
(
IsExtension
(
fname
,
L".cdb"
))
{
dataManager
.
LoadDB
(
fname
);
dataManager
.
LoadDB
(
createReader
()
);
continue
;
}
if
(
IsExtension
(
fname
,
L".conf"
))
{
#ifdef _WIN32
auto
reader
=
archiveObj
->
createAndOpenFile
(
fname
);
#else
auto
reader
=
archiveObj
->
createAndOpenFile
(
uname
);
#endif
auto
reader
=
createReader
();
if
(
!
std
::
wcscmp
(
fname
,
L"lflist.conf"
))
{
deckManager
.
LoadLFListSingle
(
reader
,
true
);
lflist_changed
=
true
;
...
...
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