(Emscripten) Integrate header files into actual drivers

This commit is contained in:
twinaphex 2015-04-19 22:01:42 +02:00
parent c0198ac391
commit 1f7482d833
6 changed files with 38 additions and 86 deletions

View File

@ -13,11 +13,23 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <unistd.h>
#include <boolean.h>
#include "../../driver.h"
#include "../../general.h"
#include "../../emscripten/RWebAudio.h"
/* forward declarations */
unsigned RWebAudioSampleRate(void);
void *RWebAudioInit(unsigned latency);
ssize_t RWebAudioWrite(const void *buf, size_t size);
bool RWebAudioStop(void);
bool RWebAudioStart(void);
void RWebAudioSetNonblockState(bool state);
void RWebAudioFree(void);
size_t RWebAudioWriteAvail(void);
size_t RWebAudioBufferSize(void);
static bool rwebaudio_is_paused;
static void rwebaudio_free(void *data)

View File

@ -13,8 +13,17 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <boolean.h>
#include "../../driver.h"
#include "../../emscripten/RWebCam.h"
/* forward declarations */
void *RWebCamInit(uint64_t caps, unsigned width, unsigned height);
void RWebCamFree(void *data);
bool RWebCamStart(void *data);
void RWebCamStop(void *data);
bool RWebCamPoll(void *data, retro_camera_frame_raw_framebuffer_t frame_raw_cb,
retro_camera_frame_opengl_texture_t frame_gl_cb);
static void *rwebcam_init(const char *device, uint64_t caps,
unsigned width, unsigned height)

View File

@ -1,28 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2012-2015 - Michael Lelli
*
* RetroArch 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.
*
* RetroArch 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 RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <unistd.h>
#include <boolean.h>
unsigned RWebAudioSampleRate(void);
void *RWebAudioInit(unsigned latency);
ssize_t RWebAudioWrite(const void *buf, size_t size);
bool RWebAudioStop(void);
bool RWebAudioStart(void);
void RWebAudioSetNonblockState(bool state);
void RWebAudioFree(void);
size_t RWebAudioWriteAvail(void);
size_t RWebAudioBufferSize(void);

View File

@ -1,24 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2012-2015 - Michael Lelli
*
* RetroArch 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.
*
* RetroArch 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 RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <boolean.h>
#include "../driver.h"
void *RWebCamInit(uint64_t caps, unsigned width, unsigned height);
void RWebCamFree(void *data);
bool RWebCamStart(void *data);
void RWebCamStop(void *data);
bool RWebCamPoll(void *data, retro_camera_frame_raw_framebuffer_t frame_raw_cb, retro_camera_frame_opengl_texture_t frame_gl_cb);

View File

@ -1,29 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2012-2015 - Michael Lelli
*
* RetroArch 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.
*
* RetroArch 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 RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
typedef struct rwebinput_state
{
uint8_t keys[32];
int mouse_x;
int mouse_y;
char mouse_l;
char mouse_r;
} rwebinput_state_t;
int RWebInputInit(void);
rwebinput_state_t *RWebInputPoll(int context);
void RWebInputDestroy(int context);

View File

@ -19,13 +19,25 @@
#include "../../driver.h"
#include <stdlib.h>
#include <boolean.h>
#include "../../general.h"
#include "../keyboard_line.h"
#include "../../emscripten/RWebInput.h"
#include "../input_joypad.h"
typedef struct rwebinput_state
{
uint8_t keys[32];
int mouse_x;
int mouse_y;
char mouse_l;
char mouse_r;
} rwebinput_state_t;
int RWebInputInit(void);
rwebinput_state_t *RWebInputPoll(int context);
void RWebInputDestroy(int context);
static bool uninited = false;
typedef struct rwebinput_input