Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Pierre Kim
OpenRCT2-mod
Commits
cdee1ddd
Commit
cdee1ddd
authored
11 years ago
by
atmaxinger
Browse files
Options
Download
Email Patches
Plain Diff
replaced WIN32 file i/o in config_save()
parent
76a7cc98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/config.c
+6
-9
src/config.c
with
6 additions
and
9 deletions
+6
-9
src/config.c
+
6
-
9
View file @
cdee1ddd
...
...
@@ -117,7 +117,6 @@ void config_reset_shortcut_keys()
*/
void
config_load
()
{
unsigned
int
bytesRead
;
FILE
*
fp
=
NULL
;
char
*
path
=
get_file_path
(
PATH_ID_GAMECFG
);
...
...
@@ -198,14 +197,12 @@ void config_load()
*/
void
config_save
()
{
HANDLE
hFile
;
DWORD
bytesWritten
;
hFile
=
CreateFile
(
get_file_path
(
PATH_ID_GAMECFG
),
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
hFile
!=
INVALID_HANDLE_VALUE
)
{
WriteFile
(
hFile
,
&
MagicNumber
,
4
,
&
bytesWritten
,
NULL
);
WriteFile
(
hFile
,
(
LPCVOID
)
0x009AAC5C
,
2155
,
&
bytesWritten
,
NULL
);
CloseHandle
(
hFile
);
FILE
*
fp
=
NULL
;
fp
=
fopen
(
get_file_path
(
PATH_ID_GAMECFG
),
"wb"
);
if
(
fp
!=
NULL
){
fwrite
(
&
MagicNumber
,
4
,
1
,
fp
);
fwrite
((
LPCVOID
)
0x009AAC5C
,
2155
,
1
,
fp
);
fclose
(
fp
);
}
}
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help