Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 69d36d3

Browse files
committed
Merge pull request #4 from runrev/peter-b/emscripten-dllexport
[emscripten] Mark exported functions with MC_DLLEXPORT_DEF.
2 parents 82a7fdb + ddcef6f commit 69d36d3

File tree

5 files changed

+13
-17
lines changed

5 files changed

+13
-17
lines changed

engine/src/em-dc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ MCCreateScreenDC()
3939
return new MCScreenDC;
4040
}
4141

42-
MCStack *
42+
MC_DLLEXPORT_DEF MCStack *
4343
MCEmscriptenGetCurrentStack()
4444
{
4545
if (MCnoui) return nil;

engine/src/em-event.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ MCEmscriptenEventFinalize()
4545

4646
/* ---------------------------------------------------------------- */
4747

48-
extern "C"
49-
uint32_t MCEmscriptenEventEncodeModifiers(bool p_shift,
50-
bool p_alt,
51-
bool p_ctrl,
52-
bool p_meta)
48+
extern "C" MC_DLLEXPORT_DEF uint32_t
49+
MCEmscriptenEventEncodeModifiers(bool p_shift,
50+
bool p_alt,
51+
bool p_ctrl,
52+
bool p_meta)
5353
{
5454
uint32_t t_result = 0;
5555

engine/src/em-exported.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
11
[
2-
'_main',
3-
'_MCEmscriptenGetCurrentStack',
4-
'_MCEmscriptenEventEncodeModifiers',
5-
6-
'_MCEventQueuePostImeCompose',
7-
'_MCEventQueuePostMouseFocus',
8-
'_MCEventQueuePostMousePosition',
9-
'_MCEventQueuePostMousePress',
10-
'_MCEventQueuePostKeyFocus',
11-
'_MCEventQueuePostKeyPress'
122
]

engine/src/em-main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ MCEmscriptenBootError(const char *p_message)
4141
exit(99);
4242
}
4343

44-
int
44+
MC_DLLEXPORT_DEF int
4545
main(int argc, char *argv[])
4646
{
4747
/* ---------- Core initialisation */

engine/src/eventqueue.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,7 @@ static bool MCEventQueuePostMouse(MCEventType p_type, MCStack *p_stack, uint32_t
924924
return true;
925925
}
926926

927+
MC_DLLEXPORT_DEF
927928
bool MCEventQueuePostMouseFocus(MCStack *p_stack, uint32_t p_time, bool p_inside)
928929
{
929930
MCEvent *t_event;
@@ -937,6 +938,7 @@ bool MCEventQueuePostMouseFocus(MCStack *p_stack, uint32_t p_time, bool p_inside
937938
return true;
938939
}
939940

941+
MC_DLLEXPORT_DEF
940942
bool MCEventQueuePostMousePress(MCStack *p_stack, uint32_t p_time, uint32_t p_modifiers, MCMousePressState p_state, int32_t p_button)
941943
{
942944
MCEvent *t_event;
@@ -965,6 +967,7 @@ bool MCEventQueuePostMouseWheel(MCStack *p_stack, uint32_t p_time, uint32_t p_mo
965967
return true;
966968
}
967969

970+
MC_DLLEXPORT_DEF
968971
bool MCEventQueuePostMousePosition(MCStack *p_stack, uint32_t p_time, uint32_t p_modifiers, int32_t p_x, int32_t p_y)
969972
{
970973
// We look through the current event queue, looking for the last mouse
@@ -1002,6 +1005,7 @@ bool MCEventQueuePostMousePosition(MCStack *p_stack, uint32_t p_time, uint32_t p
10021005
return true;
10031006
}
10041007

1008+
MC_DLLEXPORT_DEF
10051009
bool MCEventQueuePostKeyFocus(MCStack *p_stack, bool p_owner)
10061010
{
10071011
MCEvent *t_event;
@@ -1014,6 +1018,7 @@ bool MCEventQueuePostKeyFocus(MCStack *p_stack, bool p_owner)
10141018
return true;
10151019
}
10161020

1021+
MC_DLLEXPORT_DEF
10171022
bool MCEventQueuePostKeyPress(MCStack *p_stack, uint32_t p_modifiers, uint32_t p_char_code, uint32_t p_key_code)
10181023
{
10191024
MCEvent *t_event;
@@ -1028,6 +1033,7 @@ bool MCEventQueuePostKeyPress(MCStack *p_stack, uint32_t p_modifiers, uint32_t p
10281033
return true;
10291034
}
10301035

1036+
MC_DLLEXPORT_DEF
10311037
bool MCEventQueuePostImeCompose(MCStack *p_stack, bool p_enabled, uint32_t p_offset, const uint16_t *p_chars, uint32_t p_char_count)
10321038
{
10331039
uint16_t *t_new_chars;

0 commit comments

Comments
 (0)