diff --git a/src/MiniFB_common.c b/src/MiniFB_common.c index f3c009b..390596d 100755 --- a/src/MiniFB_common.c +++ b/src/MiniFB_common.c @@ -6,6 +6,24 @@ short int g_keycodes[512] = { 0 }; //------------------------------------- +//------------------------------------- +struct mfb_window * +mfb_open(const char *title, unsigned width, unsigned height) { + return mfb_open_ex(title, width, height, 0); +} + +//------------------------------------- +mfb_update_state +mfb_update(struct mfb_window *window, void *buffer) { + if (window == 0x0) { + return STATE_INVALID_WINDOW; + } + + SWindowData *window_data = (SWindowData *) window; + + return mfb_update_ex(window, buffer, window_data->buffer_width, window_data->buffer_height); +} + //------------------------------------- void mfb_set_active_callback(struct mfb_window *window, mfb_active_func callback) { diff --git a/src/ios/iOSMiniFB.m b/src/ios/iOSMiniFB.m index 9475dd0..9538291 100644 --- a/src/ios/iOSMiniFB.m +++ b/src/ios/iOSMiniFB.m @@ -53,12 +53,6 @@ create_window_data(unsigned width, unsigned height) { return window_data; } -//------------------------------------- -struct mfb_window * -mfb_open(const char *title, unsigned width, unsigned height) { - return mfb_open_ex(title, width, height, 0); -} - //------------------------------------- struct mfb_window * mfb_open_ex(const char *title, unsigned width, unsigned height, unsigned flags) { @@ -122,17 +116,6 @@ destroy_window_data(SWindowData *window_data) { } } -//------------------------------------- -mfb_update_state -mfb_update(struct mfb_window *window, void *buffer) { - if (window == 0x0) { - return STATE_INVALID_WINDOW; - } - - SWindowData *window_data = (SWindowData *) window; - return mfb_update_ex(window, buffer, window_data->buffer_width, window_data->buffer_height); -} - //------------------------------------- mfb_update_state mfb_update_ex(struct mfb_window *window, void *buffer, unsigned width, unsigned height) { diff --git a/src/macosx/MacMiniFB.m b/src/macosx/MacMiniFB.m index 10a3907..105c485 100644 --- a/src/macosx/MacMiniFB.m +++ b/src/macosx/MacMiniFB.m @@ -60,12 +60,6 @@ create_window_data(unsigned width, unsigned height) { return window_data; } -//------------------------------------- -struct mfb_window * -mfb_open(const char *title, unsigned width, unsigned height) { - return mfb_open_ex(title, width, height, 0); -} - //------------------------------------- struct mfb_window * mfb_open_ex(const char *title, unsigned width, unsigned height, unsigned flags) { @@ -223,16 +217,6 @@ update_events(SWindowData *window_data) { } } -//------------------------------------- -mfb_update_state -mfb_update(struct mfb_window *window, void *buffer) { - if(window == 0x0) { - return STATE_INVALID_WINDOW; - } - SWindowData *window_data = (SWindowData *) window; - return mfb_update_ex(window, buffer, window_data->buffer_width, window_data->buffer_height); -} - //------------------------------------- mfb_update_state mfb_update_ex(struct mfb_window *window, void *buffer, unsigned width, unsigned height) { diff --git a/src/wayland/WaylandMiniFB.c b/src/wayland/WaylandMiniFB.c index 80d7cc6..1d038cb 100644 --- a/src/wayland/WaylandMiniFB.c +++ b/src/wayland/WaylandMiniFB.c @@ -562,11 +562,6 @@ static const struct wl_shell_surface_listener shell_surface_listener = { /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -struct mfb_window * -mfb_open(const char *title, unsigned width, unsigned height) { - return mfb_open_ex(title, width, height, 0); -} - struct mfb_window * mfb_open_ex(const char *title, unsigned width, unsigned height, unsigned flags) { @@ -700,18 +695,6 @@ wl_callback_listener frame_listener = { /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -mfb_update_state -mfb_update(struct mfb_window *window, void *buffer) { - if (window == 0x0) { - return STATE_INVALID_WINDOW; - } - - SWindowData *window_data = (SWindowData *) window; - return mfb_update_ex(window, buffer, window_data->buffer_width, window_data->buffer_height); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - mfb_update_state mfb_update_ex(struct mfb_window *window, void *buffer, unsigned width, unsigned height) { diff --git a/src/windows/WinMiniFB.c b/src/windows/WinMiniFB.c index 49562c8..be31151 100644 --- a/src/windows/WinMiniFB.c +++ b/src/windows/WinMiniFB.c @@ -366,24 +366,6 @@ mfb_open_ex(const char *title, unsigned width, unsigned height, unsigned flags) return (struct mfb_window *) window_data; } -struct mfb_window * -mfb_open(const char *title, unsigned width, unsigned height) { - return mfb_open_ex(title, width, height, 0); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -mfb_update_state -mfb_update(struct mfb_window *window, void *buffer) { - if (window == 0x0) { - return STATE_INVALID_WINDOW; - } - - SWindowData *window_data = (SWindowData *) window; - - return mfb_update_ex(window, buffer, window_data->buffer_width, window_data->buffer_height); -} - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// mfb_update_state diff --git a/src/x11/X11MiniFB.c b/src/x11/X11MiniFB.c index 6d2f31c..df548c4 100644 --- a/src/x11/X11MiniFB.c +++ b/src/x11/X11MiniFB.c @@ -197,11 +197,6 @@ mfb_open_ex(const char *title, unsigned width, unsigned height, unsigned flags) return (struct mfb_window *) window_data; } -struct mfb_window * -mfb_open(const char *title, unsigned width, unsigned height) { - return mfb_open_ex(title, width, height, 0); -} - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// int translate_key(int scancode); @@ -322,18 +317,6 @@ processEvents(SWindowData *window_data) { void destroy_window_data(SWindowData *window_data); -mfb_update_state -mfb_update(struct mfb_window *window, void *buffer) { - if (window == 0x0) { - return STATE_INVALID_WINDOW; - } - - SWindowData *window_data = (SWindowData *) window; - mfb_update_ex(window, buffer, window_data->buffer_width, window_data->buffer_height); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - mfb_update_state mfb_update_ex(struct mfb_window *window, void *buffer, unsigned width, unsigned height) { if (window == 0x0) {