Rev 7873 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7873 | Rev 7894 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | 40 | ||
Line 41... | Line 41... | ||
41 | void *getprocaddress(void *exports, char *name) |
41 | void *getprocaddress(void *exports, char *name) |
42 | { |
42 | { |
43 | if (exports == NULL) { return 0; } |
43 | if (exports == NULL) { return 0; } |
44 | while (*(uint32_t*)exports != NULL) |
44 | while (*(uint32_t*)exports != 0) |
45 | { |
45 | { |
46 | char *str1 = (char*)(*(uint32_t*)exports); |
46 | char *str1 = (char*)(*(uint32_t*)exports); |
47 | if (strcmp(str1, name) == 0) |
47 | if (strcmp(str1, name) == 0) |
48 | { |
48 | { |
49 | void *ptr = *(uint32_t*)(exports + 4); |
49 | void *ptr = (void*)*(uint32_t*)(exports + 4); |
Line 50... | Line 50... | ||
50 | 50 | ||
51 | // important for debug |
51 | // important for debug |
52 | /*debug_board_write_string(name); |
52 | /*debug_board_write_string(name); |
53 | char otv[16]; |
53 | char otv[16]; |
Line 144... | Line 144... | ||
144 | 144 | ||
Line 145... | Line 145... | ||
145 | 145 | ||
Line 146... | Line 146... | ||
146 | // -------------------------------------------------------------------- |
146 | // -------------------------------------------------------------------- |
147 | 147 | ||
148 | int cdecl _getch() |
148 | int _getch() |
149 | { |
149 | { |
150 | con_init_console_dll(); |
150 | con_init_console_dll(); |
Line 151... | Line 151... | ||
151 | return con_getch(); |
151 | return con_getch(); |
152 | } |
152 | } |
153 | 153 | ||
154 | int cdecl _kbhit() |
154 | int _kbhit() |
155 | { |
155 | { |
156 | con_init_console_dll(); |
156 | con_init_console_dll(); |