mirror of
https://github.com/MiSTer-devel/Main_MiSTer.git
synced 2026-05-31 03:04:12 +00:00
* increase allowed autofire rates from 5 to 30. add autofire_on_directions option to mister.ini (defaults to 0/off) * simd rewrite of scaler memcopy * optimize screenshots / scaler copies * optimize screenshots; simd memcopy for scaler_read, add frame timer callback handler * tweaks * restore .png save functionality. * screenshot optimizations * fix double free, guard against NULL * fixing merge * add mister.ini for screenshot_image_format * correct file extension handling. * slightly tweak bmp routine * consolide screenshot code back into scaler.cpp, remove custom resize/bmp code.
42 lines
797 B
C
42 lines
797 B
C
/*
|
|
Copyright 2019 alanswx
|
|
with help from the MiSTer contributors including Grabulosaure
|
|
*/
|
|
|
|
#ifndef SCALER_H
|
|
#define SCALER_H
|
|
|
|
typedef enum {
|
|
RGB,
|
|
BGR,
|
|
BGRA,
|
|
RGBA,
|
|
ARGB32, // respect endianness
|
|
YUV,
|
|
} mister_scaler_format_t;
|
|
|
|
typedef struct {
|
|
int header;
|
|
int width;
|
|
int height;
|
|
int line;
|
|
int output_width;
|
|
int output_height;
|
|
|
|
char *map;
|
|
int num_bytes;
|
|
int map_off;
|
|
} mister_scaler;
|
|
|
|
#define MISTER_SCALER_BASEADDR 0x20000000
|
|
#define MISTER_SCALER_BUFFERSIZE 2048*3*1024
|
|
|
|
mister_scaler *mister_scaler_init();
|
|
int mister_scaler_read(mister_scaler *,unsigned char *buffer, mister_scaler_format_t format = ARGB32);
|
|
void mister_scaler_free(mister_scaler *);
|
|
|
|
void request_screenshot(char *cmd, int scaled = 0);
|
|
void screenshot_cb(void);
|
|
|
|
#endif
|