(PS3) Added initial menu - not yet compiled in

This commit is contained in:
TwinAphex51224 2012-01-10 23:33:44 +01:00
parent 61f9ceccab
commit 51ab2f2509
8 changed files with 2796 additions and 8 deletions

View File

@ -43,7 +43,7 @@ INCDIRS = -I. -Icommon
MAKE_FSELF_NPDRM = $(CELL_SDK)/$(HOST_DIR)/bin/make_fself_npdrm
MAKE_PACKAGE_NPDRM = $(CELL_SDK)/$(HOST_DIR)/bin/make_package_npdrm
OBJ = fifo_buffer.o ps3/ps3_audio.o ps3/ps3_input.o ps3/pad_input.o getopt.o ssnes.o driver.o file.o settings.o message.o rewind.o movie.o netplay.o gfx/gfx_common.o ps3/ps3_video_psgl.o gfx/shader_cg.o gfx/snes_state.o ups.o bps.o strl.o screenshot.o audio/hermite.o dynamic.o ps3/main.o audio/utils.o conf/config_file.o gfx/image.o
OBJ = fifo_buffer.o ps3/cellframework2/fileio/file_browser.o ps3/ps3_audio.o ps3/ps3_input.o ps3/pad_input.o getopt.o ssnes.o driver.o file.o settings.o message.o rewind.o movie.o gfx/gfx_common.o ps3/ps3_video_psgl.o gfx/shader_cg.o gfx/snes_state.o ups.o bps.o strl.o screenshot.o audio/hermite.o dynamic.o ps3/main.o audio/utils.o conf/config_file.o gfx/image.o
LIBS = -ldbgfont -lPSGL -lPSGLcgc -lcgc -lgcm_cmd -lgcm_sys_stub -lsnes -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysmodule_stub -laudio_stub -lnet_stub -lpthread

View File

@ -0,0 +1,185 @@
/*************************************************************************************
* -- Cellframework Mk.II - Open framework to abstract the common tasks related to
* PS3 application development.
*
* Copyright (C) 2010-2012
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
********************************************************************************/
/* SSNES - A Super Nintendo Entertainment System (SNES) Emulator frontend for libsnes.
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
* Copyright (C) 2011-2012 - Daniel De Matteis
*
* Some code herein may be based on code found in BSNES.
*
* SSNES is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* SSNES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with SSNES.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include "file_browser.h"
static int less_than_key(const void * a, const void * b)
{
DirectoryEntry * a_dir = (DirectoryEntry*)a;
DirectoryEntry * b_dir = (DirectoryEntry*)b;
/* compare a directory to a file directory is always lesser than*/
if ((a_dir->d_type == CELL_FS_TYPE_DIRECTORY && b_dir->d_type == CELL_FS_TYPE_REGULAR))
return -1;
else if (a_dir->d_type == CELL_FS_TYPE_REGULAR && b_dir->d_type == CELL_FS_TYPE_DIRECTORY)
return 1;
return strcasecmp(a_dir->d_name, b_dir->d_name);
}
static const char * filebrowser_get_extension(const char * filename)
{
const char * ext = strrchr(filename, '.');
if (ext)
return ext+1;
else
return "";
}
static void filebrowser_clear_current_entries(filebrowser_t * filebrowser)
{
for(uint32_t i = 0; i < MAX_FILE_LIMIT_CFS; i++)
{
filebrowser->cur[filebrowser->file_count].d_type = 0;
filebrowser->cur[filebrowser->file_count].d_namlen = 0;
strcpy(filebrowser->cur[filebrowser->file_count].d_name, "\0");
}
}
static bool filebrowser_parse_directory(filebrowser_t * filebrowser, const char * path, const char * extensions)
{
int fd;
/* bad path*/
if (strcmp(path,"") == 0)
return false;
/* delete old path*/
filebrowser_clear_current_entries(filebrowser);
if (cellFsOpendir(path, &fd) == CELL_FS_SUCCEEDED)
{
uint64_t nread = 0;
strcpy(filebrowser->dir[filebrowser->directory_stack_size], path);
filebrowser->file_count = 0;
filebrowser->currently_selected = 0;
CellFsDirent dirent;
while (cellFsReaddir(fd, &dirent, &nread) == CELL_FS_SUCCEEDED)
{
if (nread == 0)
break;
if ((dirent.d_type != CELL_FS_TYPE_REGULAR) && (dirent.d_type != CELL_FS_TYPE_DIRECTORY))
continue;
if (dirent.d_type == CELL_FS_TYPE_DIRECTORY && !(strcmp(dirent.d_name, ".")))
continue;
if (dirent.d_type == CELL_FS_TYPE_REGULAR)
{
char tmp_extensions[512];
strncpy(tmp_extensions, extensions, sizeof(tmp_extensions));
const char * current_extension = filebrowser_get_extension(dirent.d_name);
bool found_rom = false;
if(current_extension)
{
char * pch = strtok(tmp_extensions, "|");
while (pch != NULL)
{
if(strcmp(current_extension, pch) == 0)
{
found_rom = true;
break;
}
pch = strtok(NULL, "|");
}
}
if(!found_rom)
continue;
}
filebrowser->cur[filebrowser->file_count].d_type = dirent.d_type;
filebrowser->cur[filebrowser->file_count].d_namlen = dirent.d_namlen;
strcpy(filebrowser->cur[filebrowser->file_count].d_name, dirent.d_name);
++filebrowser->file_count;
}
cellFsClosedir(fd);
}
else
return false;
qsort(filebrowser->cur, filebrowser->file_count, sizeof(DirectoryEntry), less_than_key);
return true;
}
void filebrowser_new(filebrowser_t * filebrowser, const char * start_dir, const char * extensions)
{
filebrowser->directory_stack_size = 0;
strncpy(filebrowser->extensions, extensions, sizeof(filebrowser->extensions));
filebrowser_parse_directory(filebrowser, start_dir, filebrowser->extensions);
}
void filebrowser_reset_start_directory(filebrowser_t * filebrowser, const char * start_dir, const char * extensions)
{
filebrowser_clear_current_entries(filebrowser);
filebrowser->directory_stack_size = 0;
strncpy(filebrowser->extensions, extensions, sizeof(filebrowser->extensions));
filebrowser_parse_directory(filebrowser, start_dir, filebrowser->extensions);
}
void filebrowser_push_directory(filebrowser_t * filebrowser, const char * path, bool with_extension)
{
filebrowser->directory_stack_size++;
if(with_extension)
filebrowser_parse_directory(filebrowser, path, filebrowser->extensions);
else
filebrowser_parse_directory(filebrowser, path, "empty");
}
void filebrowser_pop_directory (filebrowser_t * filebrowser)
{
if (filebrowser->directory_stack_size > 0)
filebrowser->directory_stack_size--;
filebrowser_parse_directory(filebrowser, filebrowser->dir[filebrowser->directory_stack_size], filebrowser->extensions);
}

View File

@ -0,0 +1,121 @@
/*************************************************************************************
* -- Cellframework Mk.II - Open framework to abstract the common tasks related to
* PS3 application development.
*
* Copyright (C) 2010-2012
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
********************************************************************************/
/* SSNES - A Super Nintendo Entertainment System (SNES) Emulator frontend for libsnes.
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
* Copyright (C) 2011-2012 - Daniel De Matteis
*
* Some code herein may be based on code found in BSNES.
*
* SSNES is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* SSNES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with SSNES.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FILEBROWSER_H_
#define FILEBROWSER_H_
#define MAXJOLIET 255
#define MAX_PATH_LENGTH 1024
#define CELL_FS_MAX_FS_FILE_NAME_LENGTH (255)
#define MAX_FILE_LIMIT_CFS 30000
#include <stdbool.h>
#include <cell/cell_fs.h>
#include <string.h>
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
uint8_t d_type;
uint8_t d_namlen;
char d_name[CELL_FS_MAX_FS_FILE_NAME_LENGTH+1];
} DirectoryEntry;
typedef struct
{
uint32_t file_count; /* amount of files in current dir*/
uint32_t currently_selected; /* currently select browser entry*/
uint32_t directory_stack_size;
char dir[128][CELL_FS_MAX_FS_PATH_LENGTH]; /* info of the current directory*/
DirectoryEntry cur[MAX_FILE_LIMIT_CFS]; /* current file listing*/
char extensions[512]; /* allowed extensions*/
} filebrowser_t;
void filebrowser_new(filebrowser_t * filebrowser, const char * start_dir, const char * extensions);
void filebrowser_reset_start_directory(filebrowser_t * filebrowser, const char * start_dir, const char * extensions);
void filebrowser_push_directory(filebrowser_t * filebrowser, const char * path, bool with_extension);
void filebrowser_pop_directory (filebrowser_t * filebrowser);
#define FILEBROWSER_GET_CURRENT_DIRECTORY_NAME(filebrowser) (filebrowser.dir[filebrowser.directory_stack_size])
#define FILEBROWSER_GET_CURRENT_DIRECTORY_FILE_COUNT(filebrowser) (filebrowser.file_count)
#define FILEBROWSER_GOTO_ENTRY(filebrowser, i) filebrowser.currently_selected = i;
#define FILEBROWSER_INCREMENT_ENTRY(filebrowser) \
{ \
filebrowser.currently_selected++; \
if (filebrowser.currently_selected >= filebrowser.file_count) \
filebrowser.currently_selected = 0; \
}
#define FILEBROWSER_INCREMENT_ENTRY_POINTER(filebrowser) \
{ \
filebrowser->currently_selected++; \
if (filebrowser->currently_selected >= filebrowser->file_count) \
filebrowser->currently_selected = 0; \
}
#define FILEBROWSER_DECREMENT_ENTRY(filebrowser) \
{ \
filebrowser.currently_selected--; \
if (filebrowser.currently_selected >= filebrowser.file_count) \
filebrowser.currently_selected = filebrowser.file_count - 1; \
}
#define FILEBROWSER_DECREMENT_ENTRY_POINTER(filebrowser) \
{ \
filebrowser->currently_selected--; \
if (filebrowser->currently_selected >= filebrowser->file_count) \
filebrowser->currently_selected = filebrowser->file_count - 1; \
}
#define FILEBROWSER_GET_CURRENT_FILENAME(filebrowser) (filebrowser.cur[filebrowser.currently_selected].d_name)
#define FILEBROWSER_GET_CURRENT_ENTRY_INDEX(filebrowser) (filebrowser.currently_selected)
#define FILEBROWSER_IS_CURRENT_A_FILE(filebrowser) (filebrowser.cur[filebrowser.currently_selected].d_type == CELL_FS_TYPE_REGULAR)
#define FILEBROWSER_IS_CURRENT_A_DIRECTORY(filebrowser) (filebrowser.cur[filebrowser.currently_selected].d_type == CELL_FS_TYPE_DIRECTORY)
#ifdef __cplusplus
}
#endif
#endif /* FILEBROWSER_H_ */

View File

@ -16,10 +16,15 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <sys/process.h>
#include <sysutil/sysutil_common.h>
#include <sys/spu_initialize.h>
#include <stddef.h>
bool g_rom_loaded;
int ssnes_main(int argc, char *argv[]);
@ -29,6 +34,7 @@ SYS_PROCESS_PARAM(1001, 0x100000)
// Temporary, a more sane implementation should go here.
int main(int argc, char *argv[])
{
g_rom_loaded = false;
sys_spu_initialize(4, 3);
char arg1[] = "ssnes";
char arg2[] = "/dev_hdd0/game/SNES90000/USRDIR/main.sfc";

1181
ps3/menu-entries.h Normal file

File diff suppressed because it is too large Load Diff

1112
ps3/menu.c Normal file

File diff suppressed because it is too large Load Diff

184
ps3/menu.h Normal file
View File

@ -0,0 +1,184 @@
/* SSNES - A Super Nintendo Entertainment System (SNES) Emulator frontend for libsnes.
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
* Copyright (C) 2011-2012 - Daniel De Matteis
*
* Some code herein may be based on code found in BSNES.
*
* SSNES is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* SSNES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with SSNES.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MENU_H_
#define MENU_H_
#define WHITE 0xffffffffu
#define RED 0xff0000ffu
#define GREEN 0xff00ff00u
#define BLUE 0xffff0000u
#define YELLOW 0xff00ffffu
#define PURPLE 0xffff00ffu
#define CYAN 0xffffff00u
#define ORANGE 0xff0063ffu
#define SILVER 0xff8c848cu
#define LIGHTBLUE 0xFFFFE0E0U
#define LIGHTORANGE 0xFFE0EEFFu
#define FONT_SIZE 1.0f
typedef struct
{
uint32_t enum_id; /* enum ID of item */
char text[256]; /* item label */
float text_xpos; /* text X position (upper left corner) */
float text_ypos; /* text Y position (upper left corner) */
uint32_t text_selected_color; /* text color if selected */
uint32_t text_unselected_color; /* text color if not selected */
char comment[256]; /* item comment */
uint32_t comment_color; /* color of item comment */
float comment_scalefont; /* font scale of item comment */
float comment_xpos; /* comment X position (upper left corner) */
float comment_ypos; /* comment Y position (upper left corner) */
unsigned int * setting_ptr; /* associated pointer to setting member */
char comment_yes[256]; /* item comment (yes - if setting_ptr true) */
char comment_no[256]; /* item comment (no - if setting_ptr false) */
uint32_t default_value; /* default value of item */
uint32_t enabled; /* is the item enabled? */
uint32_t page; /* page */
} item;
typedef struct
{
char title[64]; /* menu title */
uint32_t enum_id; /* enum ID of menu */
uint32_t selected; /* index of selected item */
uint32_t page; /* page */
uint32_t refreshpage; /* bit whether or not to refresh page */
uint32_t first_setting; /* first setting */
uint32_t max_settings; /* max no of settings in menu */
item *items; /* menu items */
} menu;
#define FILE_BROWSER_MENU 0
#define GENERAL_VIDEO_MENU 1
#define GENERAL_AUDIO_MENU 2
#define EMU_GENERAL_MENU 3
#define EMU_VIDEO_MENU 4
#define EMU_AUDIO_MENU 5
#define PATH_MENU 6
#define CONTROLS_MENU 7
#define SHADER_CHOICE 8
#define PRESET_CHOICE 9
#define BORDER_CHOICE 10
#define PATH_CHOICE 11
#define GAME_AWARE_SHADER_CHOICE 12
#define PATH_SAVESTATES_DIR_CHOICE 13
#define PATH_DEFAULT_ROM_DIR_CHOICE 14
#define PATH_CHEATS_DIR_CHOICE 15
#define PATH_SRAM_DIR_CHOICE 16
#define PATH_BASE_DIR_CHOICE 17
#define INPUT_PRESET_CHOICE 18
enum
{
SETTING_CHANGE_RESOLUTION,
SETTING_SHADER_PRESETS,
SETTING_BORDER,
SETTING_SHADER,
SETTING_SHADER_2,
SETTING_GAME_AWARE_SHADER,
SETTING_FONT_SIZE,
SETTING_KEEP_ASPECT_RATIO,
SETTING_HW_TEXTURE_FILTER,
SETTING_HW_TEXTURE_FILTER_2,
SETTING_SCALE_ENABLED,
SETTING_SCALE_FACTOR,
SETTING_HW_OVERSCAN_AMOUNT,
SETTING_THROTTLE_MODE,
SETTING_TRIPLE_BUFFERING,
SETTING_ENABLE_SCREENSHOTS,
SETTING_SAVE_SHADER_PRESET,
SETTING_APPLY_SHADER_PRESET_ON_STARTUP,
SETTING_DEFAULT_VIDEO_ALL,
SETTING_SOUND_MODE,
SETTING_RSOUND_SERVER_IP_ADDRESS,
SETTING_DEFAULT_AUDIO_ALL,
SETTING_EMU_CURRENT_SAVE_STATE_SLOT,
SETTING_EMU_DEFAULT_ALL,
SETTING_EMU_VIDEO_DEFAULT_ALL,
SETTING_EMU_AUDIO_DEFAULT_ALL,
SETTING_PATH_DEFAULT_ROM_DIRECTORY,
SETTING_PATH_SAVESTATES_DIRECTORY,
SETTING_PATH_SRAM_DIRECTORY,
SETTING_PATH_CHEATS,
SETTING_PATH_BASE_DIRECTORY,
SETTING_PATH_DEFAULT_ALL,
SETTING_CONTROLS_SCHEME,
SETTING_CONTROLS_NUMBER,
SETTING_CONTROLS_DPAD_UP,
SETTING_CONTROLS_DPAD_DOWN,
SETTING_CONTROLS_DPAD_LEFT,
SETTING_CONTROLS_DPAD_RIGHT,
SETTING_CONTROLS_BUTTON_CIRCLE,
SETTING_CONTROLS_BUTTON_CROSS,
SETTING_CONTROLS_BUTTON_TRIANGLE,
SETTING_CONTROLS_BUTTON_SQUARE,
SETTING_CONTROLS_BUTTON_SELECT,
SETTING_CONTROLS_BUTTON_START,
SETTING_CONTROLS_BUTTON_L1,
SETTING_CONTROLS_BUTTON_R1,
SETTING_CONTROLS_BUTTON_L2,
SETTING_CONTROLS_BUTTON_R2,
SETTING_CONTROLS_BUTTON_L3,
SETTING_CONTROLS_BUTTON_R3,
SETTING_CONTROLS_BUTTON_L2_BUTTON_L3,
SETTING_CONTROLS_BUTTON_L2_BUTTON_R3,
SETTING_CONTROLS_BUTTON_L2_ANALOG_R_RIGHT,
SETTING_CONTROLS_BUTTON_L2_ANALOG_R_LEFT,
SETTING_CONTROLS_BUTTON_L2_ANALOG_R_UP,
SETTING_CONTROLS_BUTTON_L2_ANALOG_R_DOWN,
SETTING_CONTROLS_BUTTON_R2_ANALOG_R_RIGHT,
SETTING_CONTROLS_BUTTON_R2_ANALOG_R_LEFT,
SETTING_CONTROLS_BUTTON_R2_ANALOG_R_UP,
SETTING_CONTROLS_BUTTON_R2_ANALOG_R_DOWN,
SETTING_CONTROLS_BUTTON_R2_BUTTON_R3,
SETTING_CONTROLS_BUTTON_R3_BUTTON_L3,
SETTING_CONTROLS_ANALOG_R_UP,
SETTING_CONTROLS_ANALOG_R_DOWN,
SETTING_CONTROLS_ANALOG_R_LEFT,
SETTING_CONTROLS_ANALOG_R_RIGHT,
SETTING_CONTROLS_SAVE_CUSTOM_CONTROLS,
SETTING_CONTROLS_DEFAULT_ALL
};
#define FIRST_VIDEO_SETTING 0
#define FIRST_AUDIO_SETTING SETTING_DEFAULT_VIDEO_ALL+1
#define FIRST_EMU_SETTING SETTING_DEFAULT_AUDIO_ALL+1
#define FIRST_EMU_VIDEO_SETTING SETTING_EMU_DEFAULT_ALL+1
#define FIRST_EMU_AUDIO_SETTING SETTING_EMU_VIDEO_DEFAULT_ALL+1
#define FIRST_PATH_SETTING SETTING_EMU_AUDIO_DEFAULT_ALL+1
#define FIRST_CONTROLS_SETTING_PAGE_1 SETTING_PATH_DEFAULT_ALL+1
#define FIRST_CONTROL_BIND SETTING_CONTROLS_DPAD_UP
#define MAX_NO_OF_VIDEO_SETTINGS SETTING_DEFAULT_VIDEO_ALL+1
#define MAX_NO_OF_AUDIO_SETTINGS SETTING_DEFAULT_AUDIO_ALL+1
#define MAX_NO_OF_EMU_SETTINGS SETTING_EMU_DEFAULT_ALL+1
#define MAX_NO_OF_EMU_VIDEO_SETTINGS SETTING_EMU_VIDEO_DEFAULT_ALL+1
#define MAX_NO_OF_EMU_AUDIO_SETTINGS SETTING_EMU_AUDIO_DEFAULT_ALL+1
#define MAX_NO_OF_PATH_SETTINGS SETTING_PATH_DEFAULT_ALL+1
#define MAX_NO_OF_CONTROLS_SETTINGS SETTING_CONTROLS_DEFAULT_ALL+1
void menu_init(void);
void menu_loop(void);
extern uint32_t menu_is_running;
#endif /* MENU_H_ */

View File

@ -94,6 +94,7 @@ static bool load_fbo_proc(void) { return true; }
#define TEXTURES_MASK (TEXTURES - 1)
static bool g_quitting;
unsigned g_frame_count;
typedef struct gl
{
@ -107,8 +108,6 @@ typedef struct gl
GLuint tex_filter;
void *empty_buf;
unsigned frame_count;
#ifdef HAVE_FBO
// Render-to-texture, multipass shaders
GLuint fbo[MAX_SHADERS];
@ -512,7 +511,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
gl_t *gl = data;
gl_shader_use(1);
gl->frame_count++;
g_frame_count++;
#if defined(HAVE_CG)
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
@ -689,7 +688,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
memcpy(tex_info.coord, gl->tex_coords, sizeof(gl->tex_coords));
glClear(GL_COLOR_BUFFER_BIT);
gl_shader_set_params(width, height, gl->tex_w, gl->tex_h, gl->vp_width, gl->vp_height, gl->frame_count,
gl_shader_set_params(width, height, gl->tex_w, gl->tex_h, gl->vp_width, gl->vp_height, g_frame_count,
&tex_info, gl->prev_info, fbo_tex_info, fbo_tex_info_cnt);
glDrawArrays(GL_QUADS, 0, 4);
@ -734,7 +733,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
set_viewport(gl, rect->img_width, rect->img_height, true);
gl_shader_set_params(prev_rect->img_width, prev_rect->img_height,
prev_rect->width, prev_rect->height,
gl->vp_width, gl->vp_height, gl->frame_count,
gl->vp_width, gl->vp_height, g_frame_count,
&tex_info, gl->prev_info, fbo_tex_info, fbo_tex_info_cnt);
glDrawArrays(GL_QUADS, 0, 4);
@ -760,7 +759,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
set_viewport(gl, gl->win_width, gl->win_height, false);
gl_shader_set_params(prev_rect->img_width, prev_rect->img_height,
prev_rect->width, prev_rect->height,
gl->vp_width, gl->vp_height, gl->frame_count,
gl->vp_width, gl->vp_height, g_frame_count,
&tex_info, gl->prev_info, fbo_tex_info, fbo_tex_info_cnt);
glVertexPointer(2, GL_FLOAT, 0, vertexes_flipped);