mirror of
				https://github.com/Ryujinx/SDL.git
				synced 2025-11-04 15:34:58 +00:00 
			
		
		
		
	wayland: Fallback to default cursor if chosen one wasn't found
(cherry picked from commit 5a4283134542d4bdb3d968a836387a750ce80517)
This commit is contained in:
		
							parent
							
								
									7bf4319eb2
								
							
						
					
					
						commit
						ad0d1e2ad5
					
				| 
						 | 
					@ -273,6 +273,14 @@ static SDL_bool wayland_get_system_cursor(SDL_VideoData *vdata, Wayland_CursorDa
 | 
				
			||||||
        return SDL_FALSE;
 | 
					        return SDL_FALSE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /* Fallback to the default cursor if the chosen one wasn't found */
 | 
				
			||||||
 | 
					    if (!cursor) {
 | 
				
			||||||
 | 
					        cursor = WAYLAND_wl_cursor_theme_get_cursor(theme, "left_ptr");
 | 
				
			||||||
 | 
					        if (!cursor) {
 | 
				
			||||||
 | 
					            return SDL_FALSE;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* ... Set the cursor data, finally. */
 | 
					    /* ... Set the cursor data, finally. */
 | 
				
			||||||
    cdata->buffer = WAYLAND_wl_cursor_image_get_buffer(cursor->images[0]);
 | 
					    cdata->buffer = WAYLAND_wl_cursor_image_get_buffer(cursor->images[0]);
 | 
				
			||||||
    cdata->hot_x = cursor->images[0]->hotspot_x;
 | 
					    cdata->hot_x = cursor->images[0]->hotspot_x;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue