mirror of
				https://github.com/Ryujinx/SDL.git
				synced 2025-11-04 15:14:56 +00:00 
			
		
		
		
	Fixed detecting output on second adapter
CR: Sam Lantinga
This commit is contained in:
		
							parent
							
								
									3e3570dff7
								
							
						
					
					
						commit
						45dc89c2c2
					
				| 
						 | 
					@ -287,8 +287,8 @@ SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex)
 | 
				
			||||||
    IDXGIFactory *pDXGIFactory;
 | 
					    IDXGIFactory *pDXGIFactory;
 | 
				
			||||||
    IDXGIAdapter *pDXGIAdapter;
 | 
					    IDXGIAdapter *pDXGIAdapter;
 | 
				
			||||||
    IDXGIOutput* pDXGIOutput;
 | 
					    IDXGIOutput* pDXGIOutput;
 | 
				
			||||||
    int nAdapter = 0, nOutput = 0;
 | 
					 | 
				
			||||||
    char *displayName;
 | 
					    char *displayName;
 | 
				
			||||||
 | 
					    int nAdapter, nOutput;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!adapterIndex) {
 | 
					    if (!adapterIndex) {
 | 
				
			||||||
        SDL_InvalidParamError("adapterIndex");
 | 
					        SDL_InvalidParamError("adapterIndex");
 | 
				
			||||||
| 
						 | 
					@ -314,7 +314,9 @@ SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    displayName = WIN_StringToUTF8(pData->DeviceName);
 | 
					    displayName = WIN_StringToUTF8(pData->DeviceName);
 | 
				
			||||||
 | 
					    nAdapter = 0;
 | 
				
			||||||
    while (*adapterIndex == -1 && SUCCEEDED(IDXGIFactory_EnumAdapters(pDXGIFactory, nAdapter, &pDXGIAdapter))) {
 | 
					    while (*adapterIndex == -1 && SUCCEEDED(IDXGIFactory_EnumAdapters(pDXGIFactory, nAdapter, &pDXGIAdapter))) {
 | 
				
			||||||
 | 
					        nOutput = 0;
 | 
				
			||||||
        while (*adapterIndex == -1 && SUCCEEDED(IDXGIAdapter_EnumOutputs(pDXGIAdapter, nOutput, &pDXGIOutput))) {
 | 
					        while (*adapterIndex == -1 && SUCCEEDED(IDXGIAdapter_EnumOutputs(pDXGIAdapter, nOutput, &pDXGIOutput))) {
 | 
				
			||||||
            DXGI_OUTPUT_DESC outputDesc;
 | 
					            DXGI_OUTPUT_DESC outputDesc;
 | 
				
			||||||
            if (SUCCEEDED(IDXGIOutput_GetDesc(pDXGIOutput, &outputDesc))) {
 | 
					            if (SUCCEEDED(IDXGIOutput_GetDesc(pDXGIOutput, &outputDesc))) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue