[SDL] Multiple Graphic Adapters

EG enrico.guenther at rps.de
Wed Jul 31 21:11:07 PDT 2002


/* Enrico, 2002-07-31 */

eMail vom 2002-07-31, Re: [SDL] Multiple Graphic Adapters, (andrew.straw at adelaide.edu.au)

Hi Andrew,
you are right, to have more adapters working with the unchanged SDL library should work with any X-servers, windoze seems to be more complicated. When I've looked into the MSN library, I found that only NT/2000/XP supports (real) multiple devices (eg. adapters). The DISPLAY_DEVICE -structure is not supported in Win95/98/Me. So I think You may have multiple screens in windoze but not commonly devices which means You may use multiple adapters to extend the desktop but having the desktop running with the primary adapter and some other applications (not handled by the windowmanager) on other ones is not commonly possible with windoze. If you have a visual c++ compiler at hand you may try the following small programm to see whats the case. IMPORTANT: I cant compile it with DEV-c++ (don't have visual c++), I don't therefore if its compiling or working.

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

DISPLAY_DEVICE devstruct;
PDISPLAY_DEVICE dsptr= &devstruct;
int dev=0;

int main(int argc, char *argv[])
{
devstruct.cb= siezeof(devstruct);

while (EnumDisplayDevices(NULL,dev,dsptr,0L)) {
    printf("Name: %s, String: %s, ID: %s, Key: %s\n",&devstruct.DeviceName[0],
                                                     &devstruct.DeviceString[0],
                                                     &devstruct.DeviceID[0],
                                                     &devstruct.DeviceKey[0]);
    if ( devstruct.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP ) printf("attached to desktop\n");
    if ( devstruct.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER ) printf("mirrored\n");
    if ( devstruct.StateFlags & DISPLAY_DEVICE_MODESPRUNED ) printf("more modes\n");
    if ( devstruct.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE ) printf("primary\n");
    if ( devstruct.StateFlags & DISPLAY_DEVICE_REMOVABLE ) printf("removable\n");
    if ( devstruct.StateFlags & DISPLAY_DEVICE_VGA_COMPATIBLE ) printf("vga\n");    
  }
  system("PAUSE");	
  return 0;
}

Best regards, Enrico

/* Der Inhalt dieser eMail ist privat, eine anderweitige Verwendung verstösst gegen geltendes Recht
und ist strafbar. / The content of this eMail is strictly private, any other use is prohibited by law. */






More information about the SDL mailing list