Beispiel #1
0
HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
        struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
{
    TRACE("resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.\n",
            resource, sub_resource_idx, map_desc, debug_box(box), flags);

    return resource->resource_ops->resource_sub_resource_map(resource, sub_resource_idx, map_desc, box, flags);
}
Beispiel #2
0
HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
        struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
{
    TRACE("resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.\n",
            resource, sub_resource_idx, map_desc, debug_box(box), flags);

    flags = wined3d_resource_sanitise_map_flags(resource, flags);
    wined3d_resource_wait_idle(resource);

    return wined3d_cs_map(resource->device->cs, resource, sub_resource_idx, map_desc, box, flags);
}
Beispiel #3
0
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
		    LPSTR lpCmdLine, int nCmdShow)
{
    int rc;
    MSG msg;
    int arg1, arg2;
    int exit_code;

    debug_box ("Hello world");

    m_hinstance = hInstance;

    sr_set_locale ();

    /* Gotta split lpCmdLine manually for win98 compatibility */
    rc = sscanf (lpCmdLine, "%d %d", &arg1, &arg2);
    if (rc == 2) {
	char buf[1024];
	sprintf (buf, "%d %d", arg1, arg2);
        //MessageBox (NULL, buf, "SR EXE", MB_OK);
	g_running_standalone = 0;
	g_winamp_hwnd = (HWND) NULL;
	m_hpipe_exe_read = (HANDLE) arg1;
	m_hpipe_exe_write = (HANDLE) arg2;
    } else {
	char buf[1024];
	sprintf (buf, "NUM ARG = %d", rc);
        //MessageBox (NULL, buf, "SR EXE", MB_OK);
	g_running_standalone = 1;
	g_winamp_hwnd = (HWND) NULL;
	m_hpipe_exe_read = (HANDLE) NULL;
	m_hpipe_exe_write = (HANDLE) NULL;
    }

    rip_manager_init ();

    init ();

    debug_printf ("command line args: %d %d %d\n",
	    g_running_standalone, m_hpipe_exe_read,
	    m_hpipe_exe_write);

    if (m_hpipe_exe_read) {
	launch_pipe_threads ();
    }

    exit_code = 0;
    while(1) {
	rc = GetMessage (&msg, NULL, 0, 0);
	if (rc == -1) {
	    // handle the error and possibly exit
	    break;
	} else {
	    if (msg.message == WM_QUIT) {
		debug_printf ("Got a WM_QUIT in message loop\n");
		exit_code = msg.wParam;
		break;
	    }
	    if (msg.message == WM_DESTROY) {
		debug_printf ("Got a WM_DESTROY in message loop\n");
	    }
	    TranslateMessage (&msg);
	    DispatchMessage (&msg);
	}
    }

    debug_printf ("Fell through WinMain()\n");

    return exit_code;
}