X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fdos%2Fmain.c;h=8bcc718a3481e22ac3a7e8fff86929dd4ea6648a;hb=0be32510a5924afd8097f0d1167dbe79aea846a2;hp=ba70c5457c0b46358454ab76e203afa5d5b871c7;hpb=4e4ac855a9d53fd7dee3d640f3ab46740b991b5c;p=retroray diff --git a/src/dos/main.c b/src/dos/main.c index ba70c54..8bcc718 100644 --- a/src/dos/main.c +++ b/src/dos/main.c @@ -18,6 +18,7 @@ along with this program. If not, see . #include #include #include +#include #include #include "app.h" #include "keyb.h" @@ -47,6 +48,7 @@ int main(int argc, char **argv) int vmidx; int mx, my, mdx, mdy, prev_mx, prev_my, bnstate, bndiff; static int prev_bnstate; + char *env; #ifdef __DJGPP__ __djgpp_nearptr_enable(); @@ -65,7 +67,14 @@ int main(int argc, char **argv) return 1; } - add_log_file("retroray.log"); + if((env = getenv("RRLOG"))) { + if(tolower(env[0]) == 'c' && tolower(env[1]) == 'o' && tolower(env[2]) == 'm' + && isdigit(env[3])) { + add_log_console(env); + } else { + add_log_file(env); + } + } if(vid_init() == -1) { return 1; @@ -160,7 +169,10 @@ void app_redisplay(void) void app_swap_buffers(void) { - vid_blitfb(framebuf, opt.vsync); + if(opt.vsync) { + vid_vsync(); + } + vid_blitfb32(framebuf, 0); } void app_quit(void)