Re: [PATCH] server: assert on failure to open /dev/null (Coverity)
Marcus, IMO,fatal_error() should be preferred over assert() (hoping that fatal_error() is actually marked as no_return) A+ 2011/11/25 Marcus Meissner meiss...@suse.de Hi, if we cannot open /dev/null something is really broken. CID 5470 Ciao, Marcus --- server/request.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/server/request.c b/server/request.c index 05c7464..06fdbe8 100644 --- a/server/request.c +++ b/server/request.c @@ -760,6 +760,7 @@ void open_master_socket(void) /* make sure the stdio fds are open */ fd = open( /dev/null, O_RDWR ); +assert (fd != -1); while (fd = 0 fd = 2) fd = dup( fd ); if (!server_dir) fatal_error( directory %s cannot be accessed\n, config_dir ); -- 1.7.1 -- -- Eric Pouech
Re: [PATCH] server: assert on failure to open /dev/null (Coverity)
Eric Pouech eric.pou...@orange.fr writes: Marcus, IMO,fatal_error() should be preferred over assert() (hoping that fatal_error() is actually marked as no_return) There's no reason to have an error here, it will still work fine even if we can't open /dev/null. -- Alexandre Julliard julli...@winehq.org
Re: [1/2] kernel32: Add a test for protections accepted by CreateFileMapping, make it pass under Wine.
Dmitry Timoshkov dmi...@baikal.ru writes: @@ -350,9 +350,6 @@ HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa, switch(protect) { -case 0: -protect = PAGE_READONLY; /* Win9x compatibility */ -/* fall through */ Did you try your test on Win9x? -- Alexandre Julliard julli...@winehq.org
Re: [1/2] kernel32: Add a test for protections accepted by CreateFileMapping, make it pass under Wine.
Alexandre Julliard julli...@winehq.org wrote: @@ -350,9 +350,6 @@ HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa, switch(protect) { -case 0: -protect = PAGE_READONLY; /* Win9x compatibility */ -/* fall through */ Did you try your test on Win9x? No, i have no a win9x machine around. -- Dmitry.
Re: [1/2] kernel32: Add a test for protections accepted by CreateFileMapping, make it pass under Wine.
Dmitry Timoshkov dmi...@baikal.ru writes: Alexandre Julliard julli...@winehq.org wrote: @@ -350,9 +350,6 @@ HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa, switch(protect) { -case 0: -protect = PAGE_READONLY; /* Win9x compatibility */ -/* fall through */ Did you try your test on Win9x? No, i have no a win9x machine around. Hmmm, we should keep one available on the testbot for cases like this. -- Alexandre Julliard julli...@winehq.org
Re: dinput: Stub IDirectInputJoyConfig8 interface. (try 2)
On 11/25/2011 04:14 AM, Jacek Caban wrote: Hi Vitaliy, On 11/25/11 04:17, Vitaliy Margolen wrote: Fix QueryInterface, simplify use of AddRef, and replace LPDIRECTINPUTJOYCONFIG8 with IDirectInputJoyConfig8 *. --- dlls/dinput/dinput_main.c | 7 ++ dlls/dinput/dinput_private.h | 2 + dlls/dinput/joystick.c | 196 ++ include/dinputd.h | 243 ++ 4 files changed, 448 insertions(+), 0 deletions(-) create mode 100644 include/dinputd.h + if (IsEqualGUID(IID_IDirectInputJoyConfig8, riid )) + { + return create_joy_config( riid, ppobj ); + } This has the same problem as we discussed about msxml3 lately: http://www.winehq.org/pipermail/wine-devel/2011-November/093279.html Are you sure native is broken the same way? You were right. It is a part of IDirectInput not a standalone class. Sent a fixed patch. Vitaliy.
Re: [PATCH 1/5] wined3d: Don't apply fixups to converted surfaces.
Am Donnerstag, 24. November 2011, 22:52:32 schrieb Henri Verbeet: +if (surface-flags SFLAG_CONVERTED) +{ +ENTER_GL(); +glEnable(textype); +checkGLcall(glEnable(textype)); +LEAVE_GL(); +return WINED3D_OK; +} I don't think this is correct. E.g. signed formats without GL_NV_texture_shader have load time and read time fixups and both have to be applied. What exactly are you trying to fix? I assume it is something about P8 blits, but P8-P8 blits don't enter the ARB blitting code(due to the dest fixup check), and I don't know of any app that uses P8-RGB or SNORM-UNORM blits. Stefan signature.asc Description: This is a digitally signed message part.
Re: [PATCH] kernel32: implement GetLogicalProcessorInformation
On Nov 25, 2011, at 8:17 AM, Claudio Fontana wrote: On Fri, Nov 25, 2011 at 4:07 PM, Claudio Fontana claudio.font...@gmail.com wrote: I have resent the patch as a try 2 (there was a try 1.5 to fix test issues under windows older than XP SP3). The patch contains changes based on your feedback. Which is completely broken, since the U() macro you suggested to use is a wine/test.h feature only, and completely broke the patch. You are right. The way most files (other than tests) in Wine deal with that is that they unconditionally define NONAMELESSUNION and NONAMELESSSTRUCT. So you wouldn't use U(buffer[i]) (except in the tests, where you can do that), you'd use buffer[i].u . So I fall back to my try 1.5 for my tree. OK, you do that. I'm pretty sure AJ won't take your patch anyway until it's done right (i.e. like I said, in ntdll). I guess I'll take that up, since I have nothing better to do ;). Chip
Re: [PATCH 1/5] wined3d: Don't apply fixups to converted surfaces.
On 25 November 2011 19:50, Stefan Dösinger stefandoesin...@gmx.at wrote: Am Donnerstag, 24. November 2011, 22:52:32 schrieb Henri Verbeet: + if (surface-flags SFLAG_CONVERTED) + { + ENTER_GL(); + glEnable(textype); + checkGLcall(glEnable(textype)); + LEAVE_GL(); + return WINED3D_OK; + } I don't think this is correct. E.g. signed formats without GL_NV_texture_shader have load time and read time fixups and both have to be applied. That's silly. If that's really the case that should be fixed. Note that this case would already be broken with the current code though, arbfp_blit_set() only handles P8 and the various YUV fixups. More generally, I have some doubts about whether the way converted surfaces currently work is really what we want. What exactly are you trying to fix? I assume it is something about P8 blits, but P8-P8 blits don't enter the ARB blitting code(due to the dest fixup check), and I don't know of any app that uses P8-RGB or SNORM-UNORM blits. P8 - RGBA.
Re: [PATCH 1/5] wined3d: Don't apply fixups to converted surfaces.
Am Freitag, 25. November 2011, 20:23:01 schrieb Henri Verbeet: I don't think this is correct. E.g. signed formats without GL_NV_texture_shader have load time and read time fixups and both have to be applied. That's silly. If that's really the case that should be fixed. I don't see why it is silly. d3d sysmem format - gl texture format and gl texture format - rgba conversions are two separate things. What's unfortunate is that in the case of P8 both can do the same job and the selection code is a mess. For signed surfaces the upload conversion maps [-1.0;1.0] to [0.0;1.0] to load it into a unsigned rgba surface. When we read the surface in the shader we have to reverse that. You may be able to avoid the upload conversion by a more tricky shader conversion, but that misses the point. (And yeah, SNORM-UNORM blits are broken for other reasons.) P8 - RGBA. I'd say always store the index in the alpha component. We can do that since P8 textures are disabled, there's no other use for the alpha value. Also the primary_render_target_is_p8 is stupid. This way the additional shader conversion is redundant, but produces the correct result. Not perfect, but works for Wine 1.4. After Wine 1.4 the code should be changed to use the load time P8 conversion only if shader conversion isn't available, and only for the final blit to the screen(and software blits otherwise). Also, do you have a game that needs P8-RGBA blits? In my testing with ddraw, P8-RGBA blits don't do what you expect. They ignore the palette, and replicate the index to all channels(ie, 0xa4 - 0xa4a4a4a4). signature.asc Description: This is a digitally signed message part.