type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
includes | #include <stdarg.h> |
includes | #include <string.h> |
defines |
#define FONT_STEP_X 8
|
defines | #define FONT_STEP_Y 16
|
functions | void scr_setfullTextWindow() {
cur_x_ofs = 0; cur_y_ofs = 0;
cur_width = 320/FONT_STEP_X; cur_height = 240/FONT_STEP_Y;
} |
functions | void scr_setTextWindow(uint16_t x, uint16_t y, uint8_t maxCol, uint8_t maxRow) {
cur_x_ofs = x; cur_y_ofs = y;
cur_width = ((maxCol*FONT_STEP_X+x) >= 320)? (320-x)/FONT_STEP_X:maxCol;
cur_height = ((maxRow*FONT_STEP_Y+y) >= 240)? (240-y)/FONT_STEP_Y:maxRow;
} |
functions | void scr_setScrollOn(uint8_t flag) {
flagScroll = flag;
} |
functions | void scr_gotoxy(int8_t col, int8_t row) {
cur_col = col; cur_row = row;
} |
functions | int8_t scr_getCurRow(void) {
return cur_row;
} |
functions | void scr_fontColor(unsigned short fontC, unsigned short fontBkC) {
fontBkColor = fix_fontBkColor = fontBkC; fontColor = fix_fontColor = fontC;
} |
functions | void scr_fontColorInvers(void) {
fontBkColor = fix_fontColor; fontColor = fix_fontBkColor;
} |
functions | void scr_fontColorNormal(void) {
fontColor = fix_fontColor; fontBkColor = fix_fontBkColor;
} |
functions | void scr_putc(char c) {
if(cur_col >= cur_width) {
if(flagScroll) { cur_col = 0; cur_row++; } |
functions | void scr_puts(const char* str) {
while (*str)
scr_putc(*str++);
} |
functions | void scr_clrEndl(void) {
while(cur_col < cur_width) scr_putc(' ');
} |
functions | void scr_itoa(long val, int radix, int len) {
unsigned char c, r, sgn = 0, pad = ' ';
unsigned char s[20], i = 0;
unsigned long v;
if (radix < 0) {
radix = -radix;
if (val < 0) { val = -val; sgn = '-'; } |
functions | void scr_ftoa(double val, int len) {
if(val < 0) { scr_putc('-'); val = -val; } |
functions | void scr_printf(const char* str, ...) {
va_list arp;
int d, r, w, s, l;
va_start(arp, str);
while ((d = *str++) != 0) {
if (d != '%') {
scr_putc(d); continue;
} |
functions | void scr_dump(const unsigned char *buff, int sz) {
int i;
for(i = 0; i < sz; i++) {
scr_putc(hexAlpha[(buff[i] >> 4)&0x0f]);
scr_putc(hexAlpha[buff[i]&0x0f]);
} |
functions | void win_showWindow(uint16_t x0, uint16_t y0, uint8_t colSz, uint8_t rowSz,
uint16_t cBorder, uint16_t cFill, uint16_t cText) {
uint16_t x1 = x0+(uint16_t)colSz*FONT_STEP_X+10;
uint16_t y1 = y0+(uint16_t)rowSz*FONT_STEP_Y+10;
GUI_Rectangle(x0, y0, x1, y1, cBorder, FALSE);
GUI_Rectang... |
functions | void win_showErrorWin(void) {
win_showWindow(FONT_STEP_X*4-5, FONT_STEP_Y*4-5, 32, 7, Yellow, Red, Black);
scr_gotoxy(0, 0);
scr_setScrollOn(TRUE);
} |
functions | void win_showMsgWin(void) {
win_showWindow(FONT_STEP_X*4-5, FONT_STEP_Y*4-5, 32, 8, Magenta, Blue2, Cyan);
scr_gotoxy(0, 0);
scr_setScrollOn(TRUE);
} |
functions | void win_showProgressBar(uint16_t x, uint16_t y, uint16_t dx, uint16_t dy, uint8_t p) {
uint16_t n = (dx)*p/100;
GUI_Rectangle(x, y, x+dx, y+dy, Red, FALSE);
GUI_Rectangle(x+1, y+1, x+dx-1, y+dy-1, Red, FALSE);
GUI_Rectangle(x+2+n-1, y+2, x+dx-2, y+dy-2, Black, TRUE);
GUI_Rectangle(x+2, y+2, x+n+1, y+dy-2, Ye... |
functions | void win_showMenu(uint16_t x, uint16_t y, uint8_t col, uint8_t row) {
win_showWindow(x, y, col, row, White, Blue, Yellow);
scr_gotoxy(0, 0);
scr_setScrollOn(FALSE);
} |
functions | void win_showMenuScroll(uint16_t x, uint16_t y, uint8_t col, uint8_t row, uint8_t startPos, uint8_t selPos, uint8_t lines) {
uint16_t x1 = x+(uint16_t)col*FONT_STEP_X+10;
uint16_t y1 = y+(uint16_t)row*FONT_STEP_Y+10;
uint16_t h = (y1-y)-4;
uint16_t n = row > lines ? h: h*row/lines;
uint16_t ofs = row > lines?... |
functions | NTSTATUS
DokanDispatchFlush(
_In_ PDEVICE_OBJECT DeviceObject,
_Inout_ PIRP Irp
)
{
PIO_STACK_LOCATION irpSp;
PFILE_OBJECT fileObject;
PVOID buffer;
NTSTATUS status = STATUS_INVALID_PARAMETER;
PDokanFCB fcb;
PDokanCCB ccb;
PDokanVCB vcb;
PEVENT_CONTEXT eventContext;
ULONG event... |
functions | IRPs
if (status != STATUS_PENDING) {
Irp->IoStatus.Status = status;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
DokanPrintNTStatus(status);
} |
functions | VOID
DokanCompleteFlush(
_In_ PIRP_ENTRY IrpEntry,
_In_ PEVENT_INFORMATION EventInfo
)
{
PIRP irp;
PIO_STACK_LOCATION irpSp;
NTSTATUS status = STATUS_SUCCESS;
ULONG info = 0;
PDokanCCB ccb;
PFILE_OBJECT fileObject;
irp = IrpEntry->Irp;
irpSp = IrpEntry->IrpSp;
//FsRtlE... |
functions | void add_median_pred_cmov(uint8_t *dst, const uint8_t *top,
const uint8_t *diff, intptr_t w,
int *left, int *left_top)
{
x86_reg w2 = -w;
x86_reg x;
int l = *left & 0xff;
int tl = *left_top & 0xff;
int t;
__asm__ volatile (
... |
functions | void ff_llviddsp_init_x86(LLVidDSPContext *c)
{
int cpu_flags = av_get_cpu_flags();
#if HAVE_INLINE_ASM && HAVE_7REGS && ARCH_X86_32
if (cpu_flags & AV_CPU_FLAG_CMOV)
c->add_median_pred = add_median_pred_cmov;
#endif
if (ARCH_X86_32 && EXTERNAL_MMX(cpu_flags)) {
c->add_bytes = ff_add_bytes... |
includes |
#include <linux/hid.h> |
includes | #include <linux/slab.h> |
includes | #include <linux/module.h> |
functions | uint16_t roccat_common2_feature_report(uint8_t report_id)
{
return 0x300 | report_id;
} |
functions | int roccat_common2_receive(struct usb_device *usb_dev, uint report_id,
void *data, uint size)
{
char *buf;
int len;
buf = kmalloc(size, GFP_KERNEL);
if (buf == NULL)
{
return -ENOMEM;
} |
functions | int roccat_common2_send(struct usb_device *usb_dev, uint report_id,
void const *data, uint size)
{
char *buf;
int len;
buf = kmemdup(data, size, GFP_KERNEL);
if (buf == NULL)
{
return -ENOMEM;
} |
functions | int roccat_common2_receive_control_status(struct usb_device *usb_dev)
{
int retval;
struct roccat_common2_control control;
do
{
msleep(50);
retval = roccat_common2_receive(usb_dev,
ROCCAT_COMMON_COMMAND_CONTROL,
&control, sizeof(struct roccat_common2_control));
if (retval)
{
return ... |
functions | int roccat_common2_send_with_status(struct usb_device *usb_dev,
uint command, void const *buf, uint size)
{
int retval;
retval = roccat_common2_send(usb_dev, command, buf, size);
if (retval)
{
return retval;
} |
functions | int roccat_common2_device_init_struct(struct usb_device *usb_dev,
struct roccat_common2_device *dev)
{
mutex_init(&dev->lock);
return 0;
} |
functions | ssize_t roccat_common2_sysfs_read(struct file *fp, struct kobject *kobj,
char *buf, loff_t off, size_t count,
size_t real_size, uint command)
{
struct device *dev = kobj_to_dev(kobj)->parent->parent;
struct roccat_common2_device *roccat_dev = hid_get_drvdata(dev_get_drvdata(dev));
struct usb_devi... |
functions | ssize_t roccat_common2_sysfs_write(struct file *fp, struct kobject *kobj,
void const *buf, loff_t off, size_t count,
size_t real_size, uint command)
{
struct device *dev = kobj_to_dev(kobj)->parent->parent;
struct roccat_common2_device *roccat_dev = hid_get_drvdata(dev_get_drvdata(dev));
struct... |
includes |
#include <stdlib.h> |
includes | #include <stddef.h> |
includes | #include <stdint.h> |
includes | #include <string.h> |
includes | #include <limits.h> |
includes |
#include <file/file_path.h> |
includes | #include <compat/posix_string.h> |
includes | #include <string/stdstring.h> |
includes | #include <string/string_list.h> |
defines | #define XMB_THEME "monochrome" |
defines | #define XMB_DELAY 10 |
structs | struct xmb_texture_item
{
GRuint id;
}; |
functions | size_t xmb_list_get_selection(void *data)
{
menu_handle_t *menu = (menu_handle_t*)data;
xmb_handle_t *xmb = menu ? (xmb_handle_t*)menu->userdata : NULL;
if (!xmb)
return 0;
return xmb->categories.selection_ptr;
} |
functions | size_t xmb_list_get_size(void *data, menu_list_type_t type)
{
size_t list_size = 0;
menu_handle_t *menu = (menu_handle_t*)data;
menu_list_t *menu_list = menu_list_get_ptr();
xmb_handle_t *xmb = menu ? (xmb_handle_t*)menu->userdata : NULL;
switch (type)
{
case MENU_LIST_PLAI... |
functions | float xmb_item_y(xmb_handle_t *xmb, int i, size_t current)
{
float iy = xmb->icon.spacing.vertical;
if (i < (int)current)
if (xmb->depth > 1)
iy *= (i - (int)current + xmb->above_offset.subitem);
else
iy *= (i - (int)current + xmb->above_offset.item);
else
iy *= (i - (in... |
functions | void xmb_draw_icon_begin(gl_t *gl)
{
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
if (gl->shader && gl->shader->use)
gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
} |
functions | void xmb_draw_icon_end(void)
{
glDisable(GL_BLEND);
} |
functions | void xmb_draw_icon(gl_t *gl, xmb_handle_t *xmb,
GRuint texture,
float x, float y,
unsigned width, unsigned height,
float rotation, float scale_factor,
GRfloat *color)
{
struct gfx_coords coords;
math_matrix_4x4 mymat, mrot, mscal;
if (
x < -xmb->icon.size/2 ||
... |
functions | void xmb_draw_icon_predone(gl_t *gl, xmb_handle_t *xmb,
math_matrix_4x4 *mymat,
GRuint texture,
float x, float y,
unsigned width, unsigned height,
float alpha, float rotation, float scale_factor,
GRfloat *color)
{
struct gfx_coords coords;
if (
x < -xmb->icon.size/2 |... |
functions | void xmb_draw_boxart(gl_t *gl, xmb_handle_t *xmb, GRfloat *color, unsigned width, unsigned height)
{
struct gfx_coords coords;
float x, y;
math_matrix_4x4 mymat, mrot, mscal;
y = xmb->margins.screen.top + xmb->icon.size + xmb->boxart_size;
x = xmb->margins.screen.left + xmb->icon.spacing.horizontal +
... |
functions | void xmb_draw_text(menu_handle_t *menu,
xmb_handle_t *xmb,
const char *str, float x,
float y, float scale_factor, float alpha,
enum text_alignment text_align,
unsigned width, unsigned height)
{
uint8_t a8 = 0;
struct font_params params = {0} |
functions | void xmb_render_messagebox_internal(const char *message)
{
xmb_handle_t *xmb = NULL;
menu_handle_t *menu = menu_driver_get_ptr();
if (!menu)
return;
xmb = (xmb_handle_t*)menu->userdata;
if (!xmb || !message || !*message)
return;
strlcpy(xmb->box_message, message, sizeof(xmb->box_mess... |
functions | void xmb_frame_messagebox(const char *message)
{
int x, y, font_size;
unsigned i;
unsigned width, height;
struct string_list *list = NULL;
gl_t *gl = NULL;
xmb_handle_t *xmb = NULL;
menu_handle_t *menu = menu_driver_get_ptr();
if (!menu)
return;
video_drive... |
functions | void xmb_update_boxart(xmb_handle_t *xmb, unsigned i)
{
menu_entry_t entry;
char path[PATH_MAX_LENGTH] = {0} |
functions | void xmb_selection_pointer_changed(bool allow_animations)
{
size_t selection;
unsigned i, end, tag, height, skip;
int threshold = 0;
xmb_handle_t *xmb = NULL;
menu_handle_t *menu = menu_driver_get_ptr();
menu_list_t *menu_list = menu_list_get_ptr();
settings_t *settings = config_get_ptr();
... |
functions | void xmb_list_open_old(xmb_handle_t *xmb,
file_list_t *list, int dir, size_t current)
{
unsigned i, height = 0;
int threshold = xmb->icon.size * 10;
size_t end = 0;
end = file_list_get_size(list);
video_driver_get_size(NULL, &height);
for (i = 0; i < end; i++)
{
floa... |
functions | void xmb_list_open_new(xmb_handle_t *xmb,
file_list_t *list, int dir, size_t current)
{
unsigned i, height;
int threshold = xmb->icon.size * 10;
size_t end = file_list_get_size(list);
video_driver_get_size(NULL, &height);
for (i = 0; i < end; i++)
{
float ia;
float... |
functions | void xmb_push_animations(xmb_node_t *node, float ia, float ix)
{
menu_animation_push(
XMB_DELAY, ia, &node->alpha, EASING_IN_OUT_QUAD, -1, NULL);
menu_animation_push(
XMB_DELAY, ia, &node->label_alpha, EASING_IN_OUT_QUAD, -1, NULL);
menu_animation_push(
XMB_DELAY, ix, &node->x, EAS... |
functions | void xmb_list_switch_old(xmb_handle_t *xmb,
file_list_t *list, int dir, size_t current)
{
unsigned i;
size_t end = file_list_get_size(list);
for (i = 0; i < end; i++)
{
xmb_node_t *node = (xmb_node_t*)
menu_list_get_userdata_at_offset(list, i);
float ia = 0;
if (!n... |
functions | void xmb_list_switch_new(xmb_handle_t *xmb,
file_list_t *list, int dir, size_t current)
{
unsigned i;
size_t end = 0;
settings_t *settings = config_get_ptr();
if (settings->menu.dynamic_wallpaper_enable)
{
char path[PATH_MAX_LENGTH] = {0} |
functions | void xmb_set_title(xmb_handle_t *xmb)
{
if (xmb->categories.selection_ptr == 0)
menu_entries_get_title(xmb->title_name, sizeof(xmb->title_name));
else
{
const char *path = NULL;
file_list_get_at_offset(
xmb->horizontal_list,
xmb->categories.selection_ptr - 1,
... |
functions | void xmb_list_switch_horizontal_list(xmb_handle_t *xmb, menu_handle_t *menu)
{
unsigned j;
size_t list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL);
for (j = 0; j <= list_size; j++)
{
float ia = xmb->categories.passive.alpha;
float iz = xmb->categor... |
functions | void xmb_list_switch(xmb_handle_t *xmb)
{
size_t selection;
int dir = -1;
menu_handle_t *menu = menu_driver_get_ptr();
menu_list_t *menu_list = menu_list_get_ptr();
settings_t *settings = config_get_ptr();
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
return;
... |
functions | void xmb_list_open_horizontal_list(xmb_handle_t *xmb, menu_handle_t *menu)
{
unsigned j;
size_t list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL);
for (j = 0; j <= list_size; j++)
{
float ia = 0;
xmb_node_t *node = &xmb->settings_node;
if (j > 0)
node = xmb_get... |
functions | void xmb_refresh_horizontal_list(xmb_handle_t *xmb,
menu_handle_t *menu)
{
char mediapath[PATH_MAX_LENGTH] = {0} |
functions | int xmb_environ(menu_environ_cb_t type, void *data)
{
switch (type)
{
case MENU_ENVIRON_RESET_HORIZONTAL_LIST:
{
menu_handle_t *menu = menu_driver_get_ptr();
xmb_handle_t *xmb = menu ?
(xmb_handle_t*)menu->userdata : NULL;
if (!xmb ||... |
functions | void xmb_list_open(xmb_handle_t *xmb)
{
size_t selection;
int dir = 0;
menu_handle_t *menu = menu_driver_get_ptr();
menu_list_t *menu_list = menu_list_get_ptr();
if (!menu)
return;
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
return;
xmb->... |
functions | void xmb_populate_entries(const char *path,
const char *label, unsigned k)
{
xmb_handle_t *xmb = NULL;
menu_handle_t *menu = menu_driver_get_ptr();
if (!menu)
return;
xmb = (xmb_handle_t*)menu->userdata;
if (!xmb)
return;
if (xmb->prevent_populate)
{
xmb_selection_poin... |
functions | GRuint xmb_icon_get_id(xmb_handle_t *xmb,
xmb_node_t *core_node, xmb_node_t *node, unsigned type, bool active)
{
switch(type)
{
case MENU_FILE_DIRECTORY:
return xmb->textures.list[XMB_TEXTURE_FOLDER].id;
case MENU_FILE_PLAIN:
return xmb->textures.list[XMB_TEXTURE_FILE].id;
... |
functions | void xmb_draw_items(xmb_handle_t *xmb, gl_t *gl,
file_list_t *list, file_list_t *stack,
size_t current, size_t cat_selection_ptr, GRfloat *color,
unsigned width, unsigned height)
{
unsigned i, ticker_limit;
math_matrix_4x4 mymat, mrot, mscal;
xmb_node_t *core_node = NULL;
size_t end ... |
functions | void xmb_draw_cursor(gl_t *gl, xmb_handle_t *xmb,
GRfloat *color,
float x, float y, unsigned width, unsigned height)
{
struct gfx_coords coords;
math_matrix_4x4 mymat, mrot;
matrix_4x4_rotate_z(&mrot, 0);
matrix_4x4_multiply(&mymat, &mrot, &gl->mvp_no_rot);
coords.vertices = 4;
coor... |
functions | void xmb_render(void)
{
float delta_time, dt;
size_t selection;
unsigned i, end, height = 0;
xmb_handle_t *xmb = NULL;
settings_t *settings = config_get_ptr();
menu_handle_t *menu = menu_driver_get_ptr();
menu_list_t *menu_list = menu_list_get_ptr();
if (!menu)
return;
... |
functions | void xmb_frame_horizontal_list(xmb_handle_t *xmb,
menu_handle_t *menu, gl_t *gl, unsigned width, unsigned height,
GRfloat *color)
{
unsigned i;
size_t list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL);
for (i = 0; i <= list_size; i++)
{
xmb_node_t *node = &xmb->settings_node;
... |
functions | void xmb_frame(void)
{
size_t selection;
math_matrix_4x4 mymat, mrot, mscal;
unsigned depth, i, width, height;
char msg[PATH_MAX_LENGTH];
char title_msg[PATH_MAX_LENGTH];
char timedate[PATH_MAX_LENGTH];
GRfloat item_color[16];
GRfloat coord_color[16];
GRfloat coord_color2[16];
bool display... |
functions | void xmb_init_horizontal_list(menu_handle_t *menu, xmb_handle_t *xmb)
{
menu_displaylist_info_t info = {0} |
functions | void xmb_font(menu_handle_t *menu)
{
int font_size;
char mediapath[PATH_MAX_LENGTH], themepath[PATH_MAX_LENGTH], fontpath[PATH_MAX_LENGTH];
settings_t *settings = config_get_ptr();
menu_display_ctl(MENU_DISPLAY_CTL_FONT_SIZE, &font_size);
fill_pathname_join(mediapath, settings->assets_directory, "xmb",... |
functions | void xmb_layout(menu_handle_t *menu, xmb_handle_t *xmb)
{
int new_font_size;
size_t selection;
float scale_factor;
unsigned width, height, i, current, end, new_header_height;
menu_list_t *menu_list = menu_list_get_ptr();
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
r... |
functions | void xmb_free(void *data)
{
xmb_handle_t *xmb = NULL;
menu_handle_t *menu = (menu_handle_t*)data;
driver_t *driver = driver_get_ptr();
const struct font_renderer *font_driver =
(const struct font_renderer*)driver->font_osd_driver;
i... |
functions | void xmb_context_bg_destroy(xmb_handle_t *xmb)
{
if (xmb->textures.bg.id)
glDeleteTextures(1, (const GLuint*)&xmb->textures.bg.id);
} |
functions | bool xmb_load_image(void *data, menu_image_type_t type)
{
xmb_handle_t *xmb = NULL;
menu_handle_t *menu = menu_driver_get_ptr();
if (!menu)
return false;
xmb = (xmb_handle_t*)menu->userdata;
if (!xmb || !data)
return false;
switch (type)
{
case MENU_IMAGE_NONE:
brea... |
functions | void xmb_toggle_horizontal_list(xmb_handle_t *xmb, menu_handle_t *menu)
{
unsigned i;
size_t list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL);
for (i = 0; i <= list_size; i++)
{
xmb_node_t *node = &xmb->settings_node;
if (i > 0)
node = xmb_get_userdata_from_horizontal_list(xm... |
functions | void xmb_context_reset_horizontal_list(xmb_handle_t *xmb,
menu_handle_t *menu, const char *themepath)
{
unsigned i;
size_t list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL);
xmb->categories.x_pos = xmb->icon.spacing.horizontal *
-(float)xmb->categories.selection_ptr;
for (i ... |
functions | void xmb_context_reset_textures(xmb_handle_t *xmb, const char *iconpath)
{
unsigned i;
for (i = 0; i < XMB_TEXTURE_LAST; i++)
{
struct texture_image ti = {0} |
functions | void xmb_context_reset_background(const char *iconpath)
{
char path[PATH_MAX_LENGTH] = {0} |
functions | void xmb_context_reset(void)
{
char mediapath[PATH_MAX_LENGTH] = {0} |
functions | void xmb_navigation_clear(bool pending_push)
{
if (!pending_push)
xmb_selection_pointer_changed(true);
} |
functions | void xmb_navigation_pointer_changed(void)
{
xmb_selection_pointer_changed(true);
} |
functions | void xmb_navigation_set(bool scroll)
{
xmb_selection_pointer_changed(true);
} |
functions | void xmb_navigation_alphabet(size_t *unused)
{
xmb_selection_pointer_changed(true);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.