mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
The coordinates of the content to render depend on the render output size, not the window size in pixels. In theory, the two could differ. PR #6651 <https://github.com/Genymobile/scrcpy/pull/6651>
46 lines
916 B
C
46 lines
916 B
C
#ifndef SC_SDL_H
|
|
#define SC_SDL_H
|
|
|
|
#include "common.h"
|
|
|
|
#include <stdint.h>
|
|
#include <SDL3/SDL_render.h>
|
|
#include <SDL3/SDL_video.h>
|
|
|
|
#include "coords.h"
|
|
|
|
SDL_Window *
|
|
sc_sdl_create_window(const char *title, int64_t x, int64_t y, int64_t width,
|
|
int64_t height, int64_t flags);
|
|
|
|
struct sc_size
|
|
sc_sdl_get_window_size(SDL_Window *window);
|
|
|
|
struct sc_size
|
|
sc_sdl_get_window_size_in_pixels(SDL_Window *window);
|
|
|
|
void
|
|
sc_sdl_set_window_size(SDL_Window *window, struct sc_size size);
|
|
|
|
struct sc_point
|
|
sc_sdl_get_window_position(SDL_Window *window);
|
|
|
|
void
|
|
sc_sdl_set_window_position(SDL_Window *window, struct sc_point point);
|
|
|
|
void
|
|
sc_sdl_show_window(SDL_Window *window);
|
|
|
|
void
|
|
sc_sdl_hide_window(SDL_Window *window);
|
|
|
|
struct sc_size
|
|
sc_sdl_get_render_output_size(SDL_Renderer *renderer);
|
|
|
|
bool
|
|
sc_sdl_render_clear(SDL_Renderer *renderer);
|
|
|
|
void
|
|
sc_sdl_render_present(SDL_Renderer *renderer);
|
|
|
|
#endif
|