Android build openmw

Everything about development and the OpenMW source code.
Locked
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Android build openmw

Post by scrawl » 19 Jul 2014, 10:25

Which function is responsible for displaying the mouse cursor? I can not find it . setmousevisible , this function ? SDL can emulate touch as mouse

Code: Select all

    void InputWrapper::updateMouseSettings()
    {
...
        SDL_ShowCursor(mWantMouseVisible || !mWindowHasFocus);

User avatar
GameEnder
Posts: 34
Joined: 19 Jul 2014, 05:08

Re: Android build openmw

Post by GameEnder » 19 Jul 2014, 13:09

sandstranger wrote:I think mouse is not working because openmw need root on android
Well if it needs root, it is not requesting it. My phone is rooted, so the application should be able to request root if it needs it.

User avatar
sandstranger
Posts: 438
Joined: 19 May 2014, 19:53
Location: Oblivion

Re: Android build openmw

Post by sandstranger » 19 Jul 2014, 14:15

.
Last edited by sandstranger on 01 Aug 2014, 16:42, edited 1 time in total.

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Android build openmw

Post by scrawl » 19 Jul 2014, 15:42

Mouse motion events are handled here: https://github.com/OpenMW/openmw/blob/m ... er.cpp#L58

I don't know anything about mouse emulation in sdl. I would try to add cases for SDL_FINGERMOTION / SDL_FINGERUP / SDL_FINGERDOWN events and handle them like mouse events.

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Android build openmw

Post by scrawl » 19 Jul 2014, 15:52

You're using SDL_CreateWindowFrom, but it doesn't look like that's actually implemented for android (I'm checking SDL 2.0.2 source):

Code: Select all

    device->CreateWindow = Android_CreateWindow;
    device->SetWindowTitle = Android_SetWindowTitle;
    device->DestroyWindow = Android_DestroyWindow;
Did you check the return value of SDL_CreateWindowFrom? If it returns NULL, then that explains why there's no input.

User avatar
sandstranger
Posts: 438
Joined: 19 May 2014, 19:53
Location: Oblivion

Re: Android build openmw

Post by sandstranger » 19 Jul 2014, 16:13

.
Last edited by sandstranger on 01 Aug 2014, 16:42, edited 1 time in total.

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Android build openmw

Post by scrawl » 19 Jul 2014, 16:21

Then this method of connecting SDL and Ogre is not an option.

User avatar
sandstranger
Posts: 438
Joined: 19 May 2014, 19:53
Location: Oblivion

Re: Android build openmw

Post by sandstranger » 19 Jul 2014, 16:53

.
Last edited by sandstranger on 01 Aug 2014, 16:43, edited 1 time in total.

User avatar
sandstranger
Posts: 438
Joined: 19 May 2014, 19:53
Location: Oblivion

Re: Android build openmw

Post by sandstranger » 19 Jul 2014, 18:01

.
Last edited by sandstranger on 01 Aug 2014, 16:43, edited 1 time in total.

User avatar
sandstranger
Posts: 438
Joined: 19 May 2014, 19:53
Location: Oblivion

Re: Android build openmw

Post by sandstranger » 20 Jul 2014, 06:15

.
Last edited by sandstranger on 01 Aug 2014, 16:43, edited 1 time in total.

Locked