+int
+_tizen_PreRotatotion_LoadLibrary(SDL_WindowData *_this, const char *lib_path)
+{
+ void *lib_dll_handle = NULL;
+ char *path = NULL;
+
+ if (_this->isLoaded_pre_rotation)
+ return SDL_TRUE;
+
+ _this->tizen_pre_rotation_data = (struct Tizen_Prerotation_Data *) SDL_calloc(1, sizeof(Tizen_Prerotation_Data));
+ if (!_this->tizen_pre_rotation_data) {
+ return SDL_OutOfMemory();
+ }
+
+ if (!lib_path)
+ lib_dll_handle = SDL_LoadObject(lib_path);
+
+ if (!lib_dll_handle) {
+ path = "libwayland-egl.so";
+ lib_dll_handle = SDL_LoadObject(path);
+ }
+
+ _this->tizen_pre_rotation_data->prerotation_dll_handle = lib_dll_handle;
+
+ if (lib_dll_handle == NULL)
+ return SDL_FALSE;
+
+ _this->tizen_pre_rotation_data->wl_egl_window_set_rotation = SDL_LoadFunction(lib_dll_handle, "wl_egl_window_set_rotation");
+ if (!_this->tizen_pre_rotation_data->wl_egl_window_set_rotation)
+ return SDL_FALSE;
+
+ _this->tizen_pre_rotation_data->wl_egl_window_get_capabilities = SDL_LoadFunction(lib_dll_handle, "wl_egl_window_get_capabilities"); \
+ if (!_this->tizen_pre_rotation_data->wl_egl_window_get_capabilities)
+ return SDL_FALSE;
+
+ _this->isLoaded_pre_rotation = 1;
+
+ return SDL_TRUE;
+}
+