r2dliu / dolphin

Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.
https://dolphin-emu.org/
Other
8 stars 4 forks source link

Fix some Android compilation errors #39

Closed JosJuice closed 4 years ago

JosJuice commented 4 years ago

There is a linking error with SliderCalcRatioFromValueT in OnScreenDisplay.cpp left that I didn't manage to fix.

r2dliu commented 4 years ago
// Template functions are instantiated in imgui_widgets.cpp for a finite number of types.
    // To use them externally (for custom widget) you may need an "extern template" statement in your code in order to link to existing instances and silence Clang warnings (see #2036).
    // e.g. " extern template IMGUI_API float RoundScalarWithFormatT<float, float>(const char* format, ImGuiDataType data_type, float v); "
    template<typename T, typename SIGNED_T, typename FLOAT_T>   IMGUI_API bool  DragBehaviorT(ImGuiDataType data_type, T* v, float v_speed, T v_min, T v_max, const char* format, float power, ImGuiDragFlags flags);
    template<typename T, typename SIGNED_T, typename FLOAT_T>   IMGUI_API bool  SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, T* v, T v_min, T v_max, const char* format, float power, ImGuiSliderFlags flags, ImRect* out_grab_bb);
    template<typename T, typename FLOAT_T>                      IMGUI_API float SliderCalcRatioFromValueT(ImGuiDataType data_type, T v, T v_min, T v_max, float power, float linear_zero_pos);
    template<typename T, typename SIGNED_T>                     IMGUI_API T     RoundScalarWithFormatT(const char* format, ImGuiDataType data_type, T v);
JosJuice commented 4 years ago

I tried that, but it seemed to make no difference. Well, I guess we shouldn't be compiling for playback on Android anyway, which would avoid the problem...