Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
63c4cb81
Commit
63c4cb81
authored
Feb 20, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d5a87c72
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
gframe/config.h
gframe/config.h
+6
-0
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+1
-1
gframe/replay.cpp
gframe/replay.cpp
+2
-2
No files found.
gframe/config.h
View file @
63c4cb81
...
...
@@ -13,8 +13,12 @@
#ifdef _MSC_VER
#define myswprintf _swprintf
#define mywcsncasecmp _wcsnicmp
#define mystrncasecmp _strnicmp
#else
#define myswprintf swprintf
#define mywcsncasecmp wcsncasecmp
#define mystrncasecmp strncasecmp
#endif
#define socklen_t int
...
...
@@ -41,6 +45,8 @@
#include <wchar.h>
#define myswprintf(buf, fmt, ...) swprintf(buf, 4096, fmt, ##__VA_ARGS__)
#define mywcsncasecmp wcsncasecmp
#define mystrncasecmp strncasecmp
inline
int
_wtoi
(
const
wchar_t
*
s
)
{
wchar_t
*
endptr
;
return
(
int
)
wcstol
(
s
,
&
endptr
,
10
);
...
...
gframe/menu_handler.cpp
View file @
63c4cb81
...
...
@@ -390,7 +390,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
if
(
prev_operation
==
BUTTON_RENAME_REPLAY
)
{
wchar_t
newname
[
256
];
BufferIO
::
CopyWStr
(
mainGame
->
ebRSName
->
getText
(),
newname
,
256
);
if
(
wcsni
cmp
(
newname
+
wcslen
(
newname
)
-
4
,
L".yrp"
,
4
))
{
if
(
mywcsncase
cmp
(
newname
+
wcslen
(
newname
)
-
4
,
L".yrp"
,
4
))
{
myswprintf
(
newname
,
L"%ls.yrp"
,
mainGame
->
ebRSName
->
getText
());
}
if
(
Replay
::
RenameReplay
(
mainGame
->
lstReplayList
->
getListItem
(
prev_sel
),
newname
))
{
...
...
gframe/replay.cpp
View file @
63c4cb81
...
...
@@ -216,8 +216,8 @@ bool Replay::RenameReplay(const wchar_t* oldname, const wchar_t* newname) {
#else
char
oldfilefn
[
256
];
char
newfilefn
[
256
];
BufferIO
::
EncodeUTF8
(
oldname
,
oldfilefn
);
BufferIO
::
EncodeUTF8
(
newname
,
newfilefn
);
BufferIO
::
EncodeUTF8
(
old
f
name
,
oldfilefn
);
BufferIO
::
EncodeUTF8
(
new
f
name
,
newfilefn
);
int
result
=
rename
(
oldfilefn
,
newfilefn
);
return
result
==
0
;
#endif
...
...
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