VirtualBox

Changeset 17921 in vbox for trunk/src


Ignore:
Timestamp:
Mar 16, 2009 11:51:49 AM (16 years ago)
Author:
vboxsync
Message:

crOpenGL: add user visible warning if host 3d acceleration is disabled

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    r17919 r17921  
    1414#include "cr_process.h"
    1515#include "cr_rand.h"
     16#include "cr_netserver.h"
    1617#include "stub.h"
    1718#include <stdlib.h>
     
    2122#include <sys/types.h>
    2223#include <unistd.h>
    23 #else
    24 #include "cr_netserver.h"
    2524#endif
    2625#ifdef CHROMIUM_THREADSAFE
     
    515514    if (stub_initialized)
    516515        return true;
    517     stub_initialized = 1;
    518516   
    519517    stubInitVars();
     
    523521
    524522    crNetInit( NULL, NULL );
     523
     524#ifndef WINDOWS
     525    {
     526        CRNetServer ns;
     527
     528        ns.name = "vboxhgcm://host:0";
     529        ns.buffer_size = 1024;
     530        crNetServerConnect(&ns);
     531        if (!ns.conn)
     532        {
     533            crWarning("Failed to connect to host. Make sure 3D acceleration is enabled for this VM.");
     534            return false;
     535        }
     536        else
     537        {
     538            crNetFreeConnection(ns.conn);
     539        }
     540    }
     541#endif
     542
    525543    strcpy(response, "3 0 array 1 feedback 2 pack");
    526544    spuchain = crStrSplit( response, " " );
     
    547565    // spu chain load failed somewhere
    548566    if (!stub.spu) {
    549         stub_initialized = 0;
    550567        return false;
    551568    }
     
    577594#endif
    578595
     596    stub_initialized = 1;
    579597    return true;
    580598}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette