You are not logged in.

#1 2010-05-03 04:17:57

n4h0j
Member
From: Göteborg, Sweden
Registered: 2009-10-30
Posts: 25

[SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

Hi all.

I have installed bin32-wine-wow-hardware-cursor from AUR and it's working pretty fine I must say. I still have one important issue. That is, that the cursor acts strange when holding the button pressed down, as you do when turning etc. The cursor then moves to the middle of the screen and shakes, until you release the button.

There is a fix for this posted on the Ubuntuforums, but I don't know how to implement this in Arch. Trust me, I have tried in so many ways possible, but I don't have the knowledge to do this. Please help me, or point me in the right direction.

http://ubuntuforums.org/showpost.php?p= … tcount=172

I have managed to fix this problem myself. If any of you are wanting the same functionality as what i mentioned above, navigate to your mouse.c find the function update_mouse_state, and then make the changes below...

static void update_mouse_state( HWND hwnd, Window window, int x, int y, unsigned int state, POINT *pt )
{
    struct x11drv_thread_data *data = x11drv_thread_data();
    char *hwgl;

    get_coords( hwnd, window, x, y, pt );
    hwgl = getenv("WINE_CURSOR");

    /* update the cursor */
    
    if (hwgl == NULL){
      if (data->cursor_window != window)
      {
        data->cursor_window = window;
        wine_tsx11_lock();
        if (data->cursor) XDefineCursor( data->display, window, data->cursor );
        wine_tsx11_unlock();
      }
    }

Thank you in advance.

EDIT: To clear things out a bit. I am using 64-bit Arch. smile

Last edited by n4h0j (2010-05-03 20:55:26)


My mom says I am special.

Offline

#2 2010-05-03 04:46:16

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

I believe you need to get the source code from that package, go to mouse.c and find that particular function, then change it to that. (It looks like that isn't a complete C function, so make changes that look correct). Why that person didn't make/provide a patch is beyond me.

Nice avatar by the way wink

Last edited by cesura (2010-05-03 04:46:44)

Offline

#3 2010-05-03 05:16:50

n4h0j
Member
From: Göteborg, Sweden
Registered: 2009-10-30
Posts: 25

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

itsbrad212 wrote:

I believe you need to get the source code from that package, go to mouse.c and find that particular function, then change it to that. (It looks like that isn't a complete C function, so make changes that look correct). Why that person didn't make/provide a patch is beyond me.

Nice avatar by the way wink

I have downloaded the http://ext.enetia.pl/arch/wine-wow-hard … pkg.tar.gz and extracted it. I assume that is the source? I can't find any file named mouse.c in that archive.

Regarding the avatar: it's the most accurate picture of myself I got. My mom says I am special. wink


My mom says I am special.

Offline

#4 2010-05-03 05:25:35

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

n4h0j wrote:
itsbrad212 wrote:

I believe you need to get the source code from that package, go to mouse.c and find that particular function, then change it to that. (It looks like that isn't a complete C function, so make changes that look correct). Why that person didn't make/provide a patch is beyond me.

Nice avatar by the way wink

I have downloaded the http://ext.enetia.pl/arch/wine-wow-hard … pkg.tar.gz and extracted it. I assume that is the source? I can't find any file named mouse.c in that archive.

Regarding the avatar: it's the most accurate picture of myself I got. My mom says I am special. wink

I'll have a look around the source big_smile

EDIT: You seem to have the pacman .pkg of this program. Whoever posted that AUR package wasn't supposed to include the .pkg.tar.gz, but rather the actual code itself. You would need to find that

EDIT EDIT: This looks interesting:
http://aur.archlinux.org/packages.php?ID=33974

It includes the mouse.c patch and everything. Simple download/install with the PKGBUILD and you should be set

Last edited by cesura (2010-05-03 05:33:48)

Offline

#5 2010-05-03 06:23:27

n4h0j
Member
From: Göteborg, Sweden
Registered: 2009-10-30
Posts: 25

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

Thx for the reply.

However, I don't think that one includes the right patch either. That just looks like the 32-bit version of the bin32-wine-wow-hardware-cursor. And I cannot install that on my system.

When talking about cursor issues there are 2.

1. Getting hardware cursor in OpenGL.
2. Irritating cursor-behavior when pressing down the buttons to turn etc.

The package you refer to solves problem #1, so does the bin32-wine-wow-hardware-cursor. It's problem #2 that need fixing. I would assume, since it is just a cosmetic defect, no one else has bothered before me. tongue

But still, it's solvable in Ubuntu, and I am kind of a perfectionist. smile

EDIT: Yes, I can see now that the mouse.c is in the archive. I would be able to edit myself. But (silly question) I won't be able to run the PKGBUILD with that source, right?

Last edited by n4h0j (2010-05-03 06:28:01)


My mom says I am special.

Offline

#6 2010-05-03 06:53:13

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

n4h0j wrote:

Thx for the reply.

However, I don't think that one includes the right patch either. That just looks like the 32-bit version of the bin32-wine-wow-hardware-cursor. And I cannot install that on my system.

When talking about cursor issues there are 2.

1. Getting hardware cursor in OpenGL.
2. Irritating cursor-behavior when pressing down the buttons to turn etc.

The package you refer to solves problem #1, so does the bin32-wine-wow-hardware-cursor. It's problem #2 that need fixing. I would assume, since it is just a cosmetic defect, no one else has bothered before me. tongue

But still, it's solvable in Ubuntu, and I am kind of a perfectionist. smile

EDIT: Yes, I can see now that the mouse.c is in the archive. I would be able to edit myself. But (silly question) I won't be able to run the PKGBUILD with that source, right?

Well, you could always edit the file then re-tar/bzip it.

The PKGBUILD wiki article states:

Note: If you need to supply files which are not downloadable on the fly, e.g. self-made patches, you simply put those into the same directory where your PKGBUILD file is in and add the filename to this array. Any paths you add here are resolved relative to the directory where the PKGBUILD lies. Before the actual build process is started, all of the files referenced in this array will be downloaded or checked for existence, and makepkg will not proceed if any are missing.

So basically, edit the PKGBUILD and set the source to the location of the newly bziped file you have after applying the patch. Then it should use that one instead big_smile

Last edited by cesura (2010-05-03 06:54:46)

Offline

#7 2010-05-03 07:05:30

n4h0j
Member
From: Göteborg, Sweden
Registered: 2009-10-30
Posts: 25

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

itsbrad212 wrote:
n4h0j wrote:

Thx for the reply.

However, I don't think that one includes the right patch either. That just looks like the 32-bit version of the bin32-wine-wow-hardware-cursor. And I cannot install that on my system.

When talking about cursor issues there are 2.

1. Getting hardware cursor in OpenGL.
2. Irritating cursor-behavior when pressing down the buttons to turn etc.

The package you refer to solves problem #1, so does the bin32-wine-wow-hardware-cursor. It's problem #2 that need fixing. I would assume, since it is just a cosmetic defect, no one else has bothered before me. tongue

But still, it's solvable in Ubuntu, and I am kind of a perfectionist. smile

EDIT: Yes, I can see now that the mouse.c is in the archive. I would be able to edit myself. But (silly question) I won't be able to run the PKGBUILD with that source, right?

Well, you could always edit the file then re-tar/bzip it.

The PKGBUILD wiki article states:

Note: If you need to supply files which are not downloadable on the fly, e.g. self-made patches, you simply put those into the same directory where your PKGBUILD file is in and add the filename to this array. Any paths you add here are resolved relative to the directory where the PKGBUILD lies. Before the actual build process is started, all of the files referenced in this array will be downloaded or checked for existence, and makepkg will not proceed if any are missing.

So basically, edit the PKGBUILD and set the source to the location of the newly bziped file you have after applying the patch. Then it should use that one instead big_smile

But, that won't be possible on a 64-bit system, right? I can't use the 32-bit source.

Or am I missing some piece of the puzzle here? tongue


My mom says I am special.

Offline

#8 2010-05-03 07:17:27

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

n4h0j wrote:
itsbrad212 wrote:
n4h0j wrote:

Thx for the reply.

However, I don't think that one includes the right patch either. That just looks like the 32-bit version of the bin32-wine-wow-hardware-cursor. And I cannot install that on my system.

When talking about cursor issues there are 2.

1. Getting hardware cursor in OpenGL.
2. Irritating cursor-behavior when pressing down the buttons to turn etc.

The package you refer to solves problem #1, so does the bin32-wine-wow-hardware-cursor. It's problem #2 that need fixing. I would assume, since it is just a cosmetic defect, no one else has bothered before me. tongue

But still, it's solvable in Ubuntu, and I am kind of a perfectionist. smile

EDIT: Yes, I can see now that the mouse.c is in the archive. I would be able to edit myself. But (silly question) I won't be able to run the PKGBUILD with that source, right?

Well, you could always edit the file then re-tar/bzip it.

The PKGBUILD wiki article states:

Note: If you need to supply files which are not downloadable on the fly, e.g. self-made patches, you simply put those into the same directory where your PKGBUILD file is in and add the filename to this array. Any paths you add here are resolved relative to the directory where the PKGBUILD lies. Before the actual build process is started, all of the files referenced in this array will be downloaded or checked for existence, and makepkg will not proceed if any are missing.

So basically, edit the PKGBUILD and set the source to the location of the newly bziped file you have after applying the patch. Then it should use that one instead big_smile

But, that won't be possible on a 64-bit system, right? I can't use the 32-bit source.

Or am I missing some piece of the puzzle here? tongue

I think I'm missing part of the puzzle....

Ok, title of thread: "bin32-wine-wow-hardware-cursor"
That makes me assume 32-bit

Next, source file you downloaded:
wine-wow-hardware-cursor-1.1.43-1-i686.pkg.tar.gz
Again, 32-bit...

I'm confused with what you want now tongue

Last edited by cesura (2010-05-03 07:17:47)

Offline

#9 2010-05-03 07:29:42

n4h0j
Member
From: Göteborg, Sweden
Registered: 2009-10-30
Posts: 25

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

Sorry. My bad for not being clear in the first post. bin32-wine-wow-hardware-cursor is a precompiled package for x64, since you can't compile 32-bit source with the gcc found in Arch 64. Or, at least that's how I understand it.

I guess the only solution is to compile it myself from a 32-bit Chroot. Only problem is I am not skilled enough and I end up breaking my system every singel time I try to do it. sad

So that's why I am looking for another solution. smile


My mom says I am special.

Offline

#10 2010-05-03 07:36:13

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

n4h0j wrote:

Sorry. My bad for not being clear in the first post. bin32-wine-wow-hardware-cursor is a precompiled package for x64, since you can't compile 32-bit source with the gcc found in Arch 64. Or, at least that's how I understand it.

I guess the only solution is to compile it myself from a 32-bit Chroot. Only problem is I am not skilled enough and I end up breaking my system every singel time I try to do it. sad

So that's why I am looking for another solution. smile

Oh, okay. I think we are on the same page now.

The 32-chroot is always an option. If worst comes to worst, I compile it on my system and send you the .pkg.tar.gz. wink

Last edited by cesura (2010-05-03 07:39:15)

Offline

#11 2010-05-03 07:41:09

n4h0j
Member
From: Göteborg, Sweden
Registered: 2009-10-30
Posts: 25

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

Oh man, that would be totally awesome. smile

I hate chroot's. I simply don't understand how it works. I am not a total noob, but documentation sometimes assume you to have a certain pre-knowledge that I simply don't have.


My mom says I am special.

Offline

#12 2010-05-03 07:43:05

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

n4h0j wrote:

Oh man, that would be totally awesome. smile

I hate chroot's. I simply don't understand how it works. I am not a total noob, but documentation sometimes assume you to have a certain pre-knowledge that I simply don't have.

Ok, sure I'll try it. Is it this (http://aur.archlinux.org/packages.php?ID=33974) I am supposed to be compiling?

Offline

#13 2010-05-03 07:48:26

n4h0j
Member
From: Göteborg, Sweden
Registered: 2009-10-30
Posts: 25

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

I guess that would do it. I have not done it that way around before. We will see how it goes. smile


My mom says I am special.

Offline

#14 2010-05-03 08:05:16

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

Compiling...
Still compiling...this is why I don't use Gentoo...

Last edited by cesura (2010-05-03 08:07:45)

Offline

#15 2010-05-03 08:36:14

n4h0j
Member
From: Göteborg, Sweden
Registered: 2009-10-30
Posts: 25

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

itsbrad212 wrote:

Compiling...
Still compiling...this is why I don't use Gentoo...

Hehe, I hear you. wink


My mom says I am special.

Offline

#16 2010-05-03 11:31:17

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

Offline

#17 2010-05-03 17:30:17

n4h0j
Member
From: Göteborg, Sweden
Registered: 2009-10-30
Posts: 25

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

Thank a bunch for the helping hand. However, I just installed the package and it seems the problem is still there. Did you apply the changes to the mouse.c before compiling?


My mom says I am special.

Offline

#18 2010-05-03 19:48:31

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

n4h0j wrote:

Thank a bunch for the helping hand. However, I just installed the package and it seems the problem is still there. Did you apply the changes to the mouse.c before compiling?

Yeah, I'm sure I did. I applied the patch. Was I supposed to go in and manually change mouse.c?

Offline

#19 2010-05-03 20:06:26

n4h0j
Member
From: Göteborg, Sweden
Registered: 2009-10-30
Posts: 25

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

itsbrad212 wrote:
n4h0j wrote:

Thank a bunch for the helping hand. However, I just installed the package and it seems the problem is still there. Did you apply the changes to the mouse.c before compiling?

Yeah, I'm sure I did. I applied the patch. Was I supposed to go in and manually change mouse.c?

Yes. Mouse.c needs to be edited manually apart from the patch included in the original package.

The part in the file that say "function update_mouse_state" needs to be edited to look like this:

static void update_mouse_state( HWND hwnd, Window window, int x, int y, unsigned int state, POINT *pt )
{
    struct x11drv_thread_data *data = x11drv_thread_data();
    char *hwgl;

    get_coords( hwnd, window, x, y, pt );
    hwgl = getenv("WINE_CURSOR");

    /* update the cursor */
    
    if (hwgl == NULL){
      if (data->cursor_window != window)
      {
        data->cursor_window = window;
        wine_tsx11_lock();
        if (data->cursor) XDefineCursor( data->display, window, data->cursor );
        wine_tsx11_unlock();
      }
    }

I am sorry, this is a bit complicated. sad


My mom says I am special.

Offline

#20 2010-05-03 20:29:29

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

n4h0j wrote:
itsbrad212 wrote:
n4h0j wrote:

Thank a bunch for the helping hand. However, I just installed the package and it seems the problem is still there. Did you apply the changes to the mouse.c before compiling?

Yeah, I'm sure I did. I applied the patch. Was I supposed to go in and manually change mouse.c?

Yes. Mouse.c needs to be edited manually apart from the patch included in the original package.

The part in the file that say "function update_mouse_state" needs to be edited to look like this:

static void update_mouse_state( HWND hwnd, Window window, int x, int y, unsigned int state, POINT *pt )
{
    struct x11drv_thread_data *data = x11drv_thread_data();
    char *hwgl;

    get_coords( hwnd, window, x, y, pt );
    hwgl = getenv("WINE_CURSOR");

    /* update the cursor */
    
    if (hwgl == NULL){
      if (data->cursor_window != window)
      {
        data->cursor_window = window;
        wine_tsx11_lock();
        if (data->cursor) XDefineCursor( data->display, window, data->cursor );
        wine_tsx11_unlock();
      }
    }

I am sorry, this is a bit complicated. sad

Building again big_smile

Offline

#21 2010-05-03 20:34:34

n4h0j
Member
From: Göteborg, Sweden
Registered: 2009-10-30
Posts: 25

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

Cheers. wink


My mom says I am special.

Offline

#22 2010-05-03 20:39:33

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

Uploading file...I will post link here soon

EDIT: Life's good:
http://www.4shared.com/file/0Bdbvyvb/wi … 1143-.html

Last edited by cesura (2010-05-03 20:44:15)

Offline

#23 2010-05-03 20:54:49

n4h0j
Member
From: Göteborg, Sweden
Registered: 2009-10-30
Posts: 25

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

And it works like a charm! big_smile

Man, you really helped me out here. And I bet there are more folks that could use this as well!

Again, thx alot! smile

New PKGBUILD, if anyone needs help with that:

http://aur.pastebin.com/w9hYnGS9


My mom says I am special.

Offline

#24 2010-05-03 20:59:24

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED]Wow in bin32-wine-wow-hardware-cursor need help with patching

Sure, no problem big_smile Glad it helped

Offline

Board footer

Powered by FluxBB