On Friday 01 November 2002 12:19, Lionel Ulmer wrote:
Yes, to my eye it looks like a linking problem but I'm not sure how to tell. Maybe if I whittle it down to a single .c file which I can post to the list it'll make it easier to diagnose.
Well, the easier would be that, yes. Basically, just create the DDraw interface (as done in createDirectDrawObject) and call 'CreateSurface' on it. That should be enough to reproduce the problem (now that I think of it, I could do it myself, but well, I have no experience about creating Winelib apps :-) ).
Have managed to break my wine build after a cvs update (seem to immediately branch to zero running my program!), so still working on this.
Another thing helpful would be a disassembly of the 'setUpWindowedSurfaces' method (this would show what code is generated for the 'mp_directDraw->CreateSurface' call and thus understand why it choose the wrong method).
Okay, if it'll help you although my knowledge of x86 calling conventions and post-286 instructions etc. (last x86 I wrote was in a BIOS five years ago) is pretty hopeless :-)
00002fac <setUpWindowedSurfaces__17tDirectDrawScreen>: 2fac: 55 push %ebp 2fad: 89 e5 mov %esp,%ebp 2faf: 81 ec 8c 00 00 00 sub $0x8c,%esp 2fb5: 57 push %edi 2fb6: 56 push %esi 2fb7: 53 push %ebx 2fb8: 8b 7d 08 mov 0x8(%ebp),%edi 2fbb: 83 c4 fc add $0xfffffffc,%esp 2fbe: 6a 6c push $0x6c 2fc0: 6a 00 push $0x0 2fc2: 8d 5d 94 lea 0xffffff94(%ebp),%ebx 2fc5: 53 push %ebx 2fc6: e8 fc ff ff ff call 2fc7 <setUpWindowedSurfaces__17tDirectDrawScreen+0x1b> 2fcb: c7 45 94 6c 00 00 00 movl $0x6c,0xffffff94(%ebp) 2fd2: c7 45 98 01 00 00 00 movl $0x1,0xffffff98(%ebp) 2fd9: c7 45 fc 00 02 00 00 movl $0x200,0xfffffffc(%ebp) 2fe0: 8b 57 08 mov 0x8(%edi),%edx 2fe3: 8b 0a mov (%edx),%ecx 2fe5: 6a 00 push $0x0 2fe7: 8d 47 10 lea 0x10(%edi),%eax 2fea: 50 push %eax 2feb: 53 push %ebx 2fec: 52 push %edx 2fed: 8b 41 20 mov 0x20(%ecx),%eax 2ff0: ff d0 call *%eax 2ff2: 89 c6 mov %eax,%esi 2ff4: 83 c4 10 add $0x10,%esp 2ff7: 8d 45 80 lea 0xffffff80(%ebp),%eax 2ffa: 83 c4 fc add $0xfffffffc,%esp 2ffd: 50 push %eax 2ffe: 68 00 02 00 00 push $0x200 3003: 8d 5d 84 lea 0xffffff84(%ebp),%ebx 3006: 53 push %ebx 3007: e8 fc ff ff ff call 3008 <setUpWindowedSurfaces__17tDirectDrawScreen+0x5c> 300c: 83 c4 fc add $0xfffffffc,%esp 300f: 53 push %ebx 3010: 56 push %esi 3011: 57 push %edi 3012: e8 fc ff ff ff call 3013 <setUpWindowedSurfaces__17tDirectDrawScreen+0x67> 3017: 83 c4 20 add $0x20,%esp 301a: eb 09 jmp 3025 <setUpWindowedSurfaces__17tDirectDrawScreen+0x79> 301c: 8d 74 26 00 lea 0x0(%esi,1),%esi 3020: e8 fc ff ff ff call 3021 <setUpWindowedSurfaces__17tDirectDrawScreen+0x75> 3025: 83 c4 f4 add $0xfffffff4,%esp 3028: 57 push %edi 3029: e8 fc ff ff ff call 302a <setUpWindowedSurfaces__17tDirectDrawScreen+0x7e> 302e: 83 c4 f4 add $0xfffffff4,%esp 3031: 57 push %edi 3032: e8 fc ff ff ff call 3033 <setUpWindowedSurfaces__17tDirectDrawScreen+0x87> 3037: 83 c4 20 add $0x20,%esp 303a: 83 c4 f4 add $0xfffffff4,%esp 303d: 57 push %edi 303e: e8 fc ff ff ff call 303f <setUpWindowedSurfaces__17tDirectDrawScreen+0x93> 3043: eb 02 jmp 3047 <setUpWindowedSurfaces__17tDirectDrawScreen+0x9b> 3045: eb d9 jmp 3020 <setUpWindowedSurfaces__17tDirectDrawScreen+0x74> 3047: 8d a5 68 ff ff ff lea 0xffffff68(%ebp),%esp 304d: 5b pop %ebx 304e: 5e pop %esi 304f: 5f pop %edi 3050: c9 leave 3051: c3 ret 3052: 89 f6 mov %esi,%esi