diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2009-06-08 18:04:10 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2009-06-08 18:04:10 +0000 |
commit | eebde2a3676f7dd11011fabd7c4d74f0cb6532d5 (patch) | |
tree | c8568e4f398f5a1e2fcfc1c937dbbbc18d0f1aeb /utils/MTP/sendfirm_win.c | |
parent | 5575f425d64b555ad2399ef6e4ae3d1efcb6627d (diff) | |
download | rockbox-eebde2a3676f7dd11011fabd7c4d74f0cb6532d5.tar.gz rockbox-eebde2a3676f7dd11011fabd7c4d74f0cb6532d5.zip |
Major W32 beastpatcher rework (FS#10220).
Update beastpatcher to scan for the device separately, rework MTP_DLL and modify to allow building with VS2005.
- include pstdint.h when building with VS2005 as VS doesn't have inttypes.h
- don't use bool in the DLL as VS doesn't support type bool in C.
- rearrange DLL files to avoid filename ambiguities with sendfirm.
- include MTP_DLL.h instead of duplicating prototypes. Adjust header for easy inclusion.
- make MTP_DLL project file also copy the resulting dll to MTP folder for convenience.
- extend MTP_DLL API for separate device scanning. Note that this (intentionally) breaks compatibility of the dll.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21221 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/MTP/sendfirm_win.c')
-rw-r--r-- | utils/MTP/sendfirm_win.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/MTP/sendfirm_win.c b/utils/MTP/sendfirm_win.c index c16a7ab68b..3c45aa6ae7 100644 --- a/utils/MTP/sendfirm_win.c +++ b/utils/MTP/sendfirm_win.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #define LPWSTR wchar_t* | ||
23 | 22 | ||
24 | #include <stdio.h> | 23 | #include <stdio.h> |
25 | #include <string.h> | 24 | #include <string.h> |
@@ -27,8 +26,9 @@ | |||
27 | #include <stdlib.h> | 26 | #include <stdlib.h> |
28 | #include <wchar.h> | 27 | #include <wchar.h> |
29 | #include <stdbool.h> | 28 | #include <stdbool.h> |
29 | #include <windows.h> | ||
30 | 30 | ||
31 | extern __declspec(dllimport) bool send_fw(LPWSTR file, int filesize, void (*callback)(unsigned int progress, unsigned int max)); | 31 | #include "MTP_DLL/MTP_DLL.h" |
32 | 32 | ||
33 | void usage(void) | 33 | void usage(void) |
34 | { | 34 | { |
@@ -76,7 +76,7 @@ int main(int argc, char **argv) | |||
76 | 76 | ||
77 | fprintf(stdout, "Sending firmware...\n"); | 77 | fprintf(stdout, "Sending firmware...\n"); |
78 | 78 | ||
79 | if(send_fw(tmp, filesize(argv[1]), &callback)) | 79 | if(mtp_sendnk(tmp, filesize(argv[1]), &callback)) |
80 | fprintf(stdout, "Firmware sent successfully!\n"); | 80 | fprintf(stdout, "Firmware sent successfully!\n"); |
81 | else | 81 | else |
82 | fprintf(stdout, "Error occured during sending!\n"); | 82 | fprintf(stdout, "Error occured during sending!\n"); |