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
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
MyCard
ygopro
Commits
7f962a99
Commit
7f962a99
authored
Mar 03, 2025
by
Chen Bill
Committed by
GitHub
Mar 03, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix open ydk, yrp file (#2707)
* update Game::Initialize * fix open ydk, yrp file * split
parent
03e073d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
19 deletions
+20
-19
gframe/game.cpp
gframe/game.cpp
+1
-1
gframe/gframe.cpp
gframe/gframe.cpp
+19
-18
No files found.
gframe/game.cpp
View file @
7f962a99
...
...
@@ -68,7 +68,7 @@ bool IsExtension(const char* filename, const char* extension) {
bool
Game
::
Initialize
()
{
LoadConfig
();
irr
::
SIrrlichtCreationParameters
params
=
irr
::
SIrrlichtCreationParameters
()
;
irr
::
SIrrlichtCreationParameters
params
{}
;
params
.
AntiAlias
=
gameConf
.
antialias
;
if
(
gameConf
.
use_d3d
)
params
.
DriverType
=
irr
::
video
::
EDT_DIRECT3D9
;
...
...
gframe/gframe.cpp
View file @
7f962a99
...
...
@@ -61,7 +61,7 @@ int main(int argc, char* argv[]) {
return
0
;
#ifdef _WIN32
int
wargc
;
int
wargc
=
0
;
std
::
unique_ptr
<
wchar_t
*
[],
void
(
*
)(
wchar_t
**
)
>
wargv
(
CommandLineToArgvW
(
GetCommandLineW
(),
&
wargc
),
[](
wchar_t
**
wargv
)
{
LocalFree
(
wargv
);
});
...
...
@@ -76,6 +76,24 @@ int main(int argc, char* argv[]) {
bool
keep_on_return
=
false
;
bool
deckCategorySpecified
=
false
;
for
(
int
i
=
1
;
i
<
wargc
;
++
i
)
{
if
(
wargc
==
2
&&
std
::
wcslen
(
wargv
[
1
])
>=
4
)
{
wchar_t
*
pstrext
=
wargv
[
1
]
+
std
::
wcslen
(
wargv
[
1
])
-
4
;
if
(
!
mywcsncasecmp
(
pstrext
,
L".ydk"
,
4
))
{
open_file
=
true
;
BufferIO
::
CopyWideString
(
wargv
[
1
],
open_file_name
);
exit_on_return
=
true
;
ClickButton
(
ygo
::
mainGame
->
btnDeckEdit
);
break
;
}
if
(
!
mywcsncasecmp
(
pstrext
,
L".yrp"
,
4
))
{
open_file
=
true
;
BufferIO
::
CopyWideString
(
wargv
[
1
],
open_file_name
);
exit_on_return
=
true
;
ClickButton
(
ygo
::
mainGame
->
btnReplayMode
);
ClickButton
(
ygo
::
mainGame
->
btnLoadReplay
);
break
;
}
}
if
(
wargv
[
i
][
0
]
==
L'-'
&&
wargv
[
i
][
1
]
==
L'e'
&&
wargv
[
i
][
2
]
!=
L'\0'
)
{
ygo
::
dataManager
.
LoadDB
(
&
wargv
[
i
][
2
]);
continue
;
...
...
@@ -171,23 +189,6 @@ int main(int argc, char* argv[]) {
if
(
open_file
)
ClickButton
(
ygo
::
mainGame
->
btnLoadSinglePlay
);
break
;
}
else
if
(
wargc
==
2
&&
std
::
wcslen
(
wargv
[
1
])
>=
4
)
{
wchar_t
*
pstrext
=
wargv
[
1
]
+
std
::
wcslen
(
wargv
[
1
])
-
4
;
if
(
!
mywcsncasecmp
(
pstrext
,
L".ydk"
,
4
))
{
open_file
=
true
;
BufferIO
::
CopyWideString
(
wargv
[
i
],
open_file_name
);
exit_on_return
=
!
keep_on_return
;
ClickButton
(
ygo
::
mainGame
->
btnDeckEdit
);
break
;
}
if
(
!
mywcsncasecmp
(
pstrext
,
L".yrp"
,
4
))
{
open_file
=
true
;
BufferIO
::
CopyWideString
(
wargv
[
i
],
open_file_name
);
exit_on_return
=
!
keep_on_return
;
ClickButton
(
ygo
::
mainGame
->
btnReplayMode
);
ClickButton
(
ygo
::
mainGame
->
btnLoadReplay
);
break
;
}
}
}
ygo
::
mainGame
->
MainLoop
();
...
...
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